diff options
author | Tom Rix <Tom.Rix@windriver.com> | 2010-01-18 08:08:32 -0600 |
---|---|---|
committer | Tom Rix <Tom.Rix@windriver.com> | 2010-01-18 08:08:32 -0600 |
commit | a7709d926dbc7cb1541034fcf2b21ce3e838cb12 (patch) | |
tree | 72c58261577bc00d98dbd208e4fa95dfbb2487a5 /common/dlmalloc.c | |
parent | 1c2a8e359ebbec0dbef62f5b54c72f9cd72ccd59 (diff) | |
parent | 88ffb2665cd066b6b20cfaade13929d4e8428dde (diff) |
Merge branch 't-ml-master' into t-master
Diffstat (limited to 'common/dlmalloc.c')
-rw-r--r-- | common/dlmalloc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/dlmalloc.c b/common/dlmalloc.c index 735b3443e63..205fc40ac83 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -2179,6 +2179,12 @@ Void_t* mALLOc(bytes) size_t bytes; INTERNAL_SIZE_T nb; + /* check if mem_malloc_init() was run */ + if ((mem_malloc_start == 0) && (mem_malloc_end == 0)) { + /* not initialized yet */ + return 0; + } + if ((long)bytes < 0) return 0; nb = request2size(bytes); /* padded request size; */ |