mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-20 21:53:12 +00:00
still tracking blasted memory corruption bug.
This commit is contained in:
parent
5c52c8e274
commit
3059a5c3e9
@ -353,13 +353,13 @@ int ob_dump(overlay_buffer *b,char *desc)
|
||||
void *_serval_debug_malloc(unsigned int bytes,char *file,const char *func,int line)
|
||||
{
|
||||
void *r=malloc(bytes+SDM_GUARD_AFTER);
|
||||
fprintf(stderr,"%s:%d:%s(): malloc(%d) -> %p\n",file,line,func,bytes,r);
|
||||
fprintf(stderr,"%s:%d:%s(): malloc(%d) -> %p\n",file,line,func,bytes,r);
|
||||
return r;
|
||||
}
|
||||
|
||||
void *_serval_debug_calloc(unsigned int bytes,unsigned int count,char *file,const char *func,int line)
|
||||
{
|
||||
void *r=calloc(bytes+SDM_GUARD_AFTER,count);
|
||||
void *r=calloc((bytes*count)+SDM_GUARD_AFTER,1);
|
||||
fprintf(stderr,"%s:%d:%s(): calloc(%d,%d) -> %p\n",file,line,func,bytes,count,r);
|
||||
return r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user