[ANN] malloc'd ByteArrays
Brian Rice
water at tunes.org
Mon Dec 12 19:52:51 PST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Dec 12, 2005, at 7:33 PM, Todd Fleming wrote:
> This bothers me (I don't like arbitrary limits):
> static void* memory_areas [SLATE_MEMS_MAXIMUM];
> static int memory_sizes [SLATE_MEMS_MAXIMUM];
>
> Why not use a pointer instead of a handle? Of course this will
> require the saveActions hook, but we will need that anyway so
> bitmap data won't be lost.
I don't want to give the Image a pointer for safety reasons, and also
because it's a pain to have to deal primarily with 32-bit or 64-bit
pointers in tagged-pointer space. There's also two words of header
overhead for every such value in the image.
Probably one extra primitive to provide the pointer when needed is
the easiest thing. I wanted to be able to do this without involving
the image at all, just using a C API, but control-flow-wise, this is
problematic.
- --
- -Brian
http://tunes.org/~water/brice.vcf
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFDnkWTPVkAvLW1zf4RAs3oAJ4+UrSRFudd/idyXm1YT4Bi1IaQYgCePfVi
HMit5oY1URjoMyBlZhnYWOo=
=tpel
-----END PGP SIGNATURE-----
More information about the Slate
mailing list