allow using malloc for memory allocation

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@477 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2002-05-19 19:04:33 +00:00
parent 008cd709a1
commit 9674c91da6
7 changed files with 196 additions and 46 deletions

View File

@@ -49,7 +49,7 @@ Int LoadForeign( StringList ofiles, StringList libs,
return LOAD_FAILLED;
}
ofiles->handle = malloc( sizeof(shl_t) );
ofiles->handle = AllocCodeSpace( sizeof(shl_t) );
*(shl_t *)ofiles->handle = shl_load( FileNameBuf, BIND_DEFERRED, 0 );
if( *(shl_t *)ofiles->handle == NULL ) {
strerror_r( errno, LoadMsg, 512 );
@@ -110,7 +110,7 @@ void ShutdownLoadForeign( void )
perror( NULL );
return;
}
free( objs->handle );
FreeCodeSpace( objs->handle );
objs = objs->next;
}
@@ -122,7 +122,7 @@ void ShutdownLoadForeign( void )
perror( NULL );
return;
}
free( libs->handle );
FreeCodeSpace( libs->handle );
libs = libs->next;
}
f_code = f_code->next;