I'm pretty sure SLI does not use just one cards memory, but writes the same things to both of them so that they both have access to it and can work with it.
So mixing the 512 and 256 versions (if it is possible), would give you only 256megs of memory.
yadge is correct it writes from one cards Vram to the other. Also you can't write 512MB of texture data into a space of only 256MB, trust me you must have both cards have the same amount of Vram. So two cards having 256MB doesn't = 512MB of Vram. A 256MB graphics card is very limited and considered not optimal. The lowest one should go is 512MB of Vram.
technically you can SLI both cards but the memory of the 512 card would be down sized to 256.
Can I mix and match graphics cards with different sizes of memory?
While it is not recommended, NVIDIA does offer this flexibility using Coolbits. When purchasing a second graphics card, you should try to match the memory size so that you are ensured full value and performance from your purchase. For example, if your first card is a GeForce 6600 GT with 128MB of memory, you should purchase a second GeForce 6600 GT with 128MB of memory. However, using Coolbits (value set to 18), you can force both of the cards to use the lower of the two memory sizes and operate together in SLI mode. When dissimilar memory sizes are enabled to work together using Coolbits, the effective memory size for each card becomes the smaller of the two memory sizes. Instructions to enable this feature can be found here.