index 2ee433f4f520dab943ade24ce8791597da716cd9..d9c00d332fdc5e0a75d01228a3f704fb373913c6 100644 (file)
/*****************************************************************************/
void* DLIF_malloc(size_t size)
{
- return malloc(size*sizeof(uint8_t));
+ return iblMalloc(size*sizeof(uint8_t));
}
/*****************************************************************************/
/*****************************************************************************/
void DLIF_free(void* ptr)
{
- free(ptr);
+ iblFree(ptr);
}
/*****************************************************************************/
/* load placement or both load and run placement, then we can do the */
/* copy. */
/*------------------------------------------------------------------------*/
- memset(targ_req->host_address, 0, obj_desc->memsz_in_bytes);
- fseek(f,targ_req->offset,SEEK_SET);
- fread(targ_req->host_address,obj_desc->objsz_in_bytes,1,f);
+ if (obj_desc->objsz_in_bytes)
+ {
+ /* Do not clear uninitialized data section, so that the section can
+ be mapped to the same region IBL uses */
+ memset(targ_req->host_address, 0, obj_desc->memsz_in_bytes);
+ fseek(f,targ_req->offset,SEEK_SET);
+ fread(targ_req->host_address,obj_desc->objsz_in_bytes,1,f);
+ }
/*------------------------------------------------------------------------*/
/* Once we have target address for this allocation, add debug information */