[ANN] malloc'd ByteArrays

Todd Fleming todd at flemingcnc.com
Mon Dec 12 16:59:49 PST 2005


Here's a patch to fix the Windows build of this.

Todd

Brian Rice wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
>
> So I've now uploaded a minimally-working malloc()/free() VM module  
> that minimally supports use as a ByteArray. There are new VM sources  
> and images, and I've updated the alpha tree and the slate-current  
> tarball with this new feature.
>
> The basics can be read in src/mobius/vm/platform/malloc.c with vm/ext/ 
> malloc.slate holding the primitives.
>
> The user-land code is extremely primitive and is src/lib/ 
> memoryarea.slate. MemoryArea is a "dual personality" type, acting as  
> an ExternalResource, but also appearing as a ByteArray when it is  
> open - print-outs will also change if it is open or closed, for now.
>
> I added beyond the basic primitives, a  
> replaceFrom:to:with:startingAt: batch byte-mover, but there's some  
> kind of bug in the readMemory/writeMemory routines where only the  
> first byte is being copied. I'm sure the problem is simple, since the  
> source is simple, but for now I've left the method commented out. If  
> someone can look at this and spot my error, I'll gladly patch it up  
> or accept a patch.
>
> In any case, this is a first working revision and doesn't break  
> anything. Enjoy. :)
>
> PS: Any ideas on how to use it more generally than the origianl Cairo  
> use-case? I'll take a look at ExternalLibrary and see what can be  
> done there.
>
> - --
> - -Brian
> http://tunes.org/~water/brice.vcf
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (Darwin)
>
> iD8DBQFDng1HPVkAvLW1zf4RApB/AJ9T93wZjOGe8dA/ZUGmD6isYJwwWACfYxej
> 4Uh6Fps8DRTxGcwdY2gKrFw=
> =gkfb
> -----END PGP SIGNATURE-----
>
>
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: windows_malloc_fix.gz
Type: application/x-gzip
Size: 4658 bytes
Desc: not available
Url : /archives/slate/attachments/20051212/59f5aec7/windows_malloc_fix.bin


More information about the Slate mailing list