diff options
Diffstat (limited to 'src/common/malloc.c')
-rw-r--r-- | src/common/malloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/malloc.c b/src/common/malloc.c index e98ec770a..372991fbe 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -253,7 +253,7 @@ void* _mmalloc(size_t size, const char *file, int line, const char *func ) p->unit_head.block = NULL; p->unit_head.size = 0; p->unit_head.file = file; - p->unit_head.line = line; + p->unit_head.line = (unsigned short)line; p->prev = NULL; if (unit_head_large_first == NULL) p->next = NULL; @@ -327,7 +327,7 @@ void* _mmalloc(size_t size, const char *file, int line, const char *func ) head->block = block; head->file = file; - head->line = line; + head->line = (unsigned short)line; head->size = (unsigned short)size; *(long*)((char*)head + sizeof(struct unit_head) - sizeof(long) + size) = 0xdeadbeaf; return (char *)head + sizeof(struct unit_head) - sizeof(long); @@ -426,7 +426,7 @@ void _mfree(void *ptr, const char *file, int line, const char *func ) #ifdef DEBUG_MEMMGR memset(ptr, 0xfd, block->unit_size - sizeof(struct unit_head) + sizeof(long) ); head->file = file; - head->line = line; + head->line = (unsigned short)line; #endif memmgr_assert( block->unit_used > 0 ); if(--block->unit_used == 0) { |