[Expat-checkins] expat/amiga stdlib.c,1.1,1.2
Steven Solie
ssolie at users.sourceforge.net
Sun Mar 19 05:33:01 CET 2006
Update of /cvsroot/expat/expat/amiga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21116
Modified Files:
stdlib.c
Log Message:
now allocates shared memory and frees the correct memory block
Index: stdlib.c
===================================================================
RCS file: /cvsroot/expat/expat/amiga/stdlib.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- stdlib.c 24 Dec 2005 06:39:56 -0000 1.1
+++ stdlib.c 19 Mar 2006 04:32:58 -0000 1.2
@@ -30,7 +30,7 @@
{
uint32 size = sizeof(uint32) + len;
- uint32 *mem = AllocMem(size, MEMF_ANY);
+ uint32 *mem = AllocMem(size, MEMF_SHARED);
if ( mem != 0 ) {
*mem = size;
++mem;
@@ -67,8 +67,8 @@
void free (void * mem)
{
if ( mem != 0 ) {
- uint32 size = *(((uint32*)mem) - 1);
- FreeMem(mem, size);
+ uint32 * size_ptr = ((uint32*)mem) - 1;
+ FreeMem(size_ptr, *size_ptr);
}
}
More information about the Expat-checkins
mailing list