fix bug related to allocating primitives on startup, which might explain some failures in writing bytecode
svn: r9488
This commit is contained in:
parent
f4287c4eb5
commit
8e23842d0c
|
@ -3967,7 +3967,10 @@ void *GC_malloc_atomic(size_t size_in_bytes)
|
|||
/* Plain malloc: */
|
||||
void *GC_malloc_atomic_uncollectable(size_t size_in_bytes)
|
||||
{
|
||||
return malloc(size_in_bytes);
|
||||
void *p;
|
||||
p = malloc(size_in_bytes);
|
||||
memset(p, 0, size_in_bytes);
|
||||
return p;
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
|
|
@ -556,7 +556,7 @@ void *GC_malloc_one_tagged(size_t s) { return allocate(s, PAGE_TAGGED); }
|
|||
void *GC_malloc_one_xtagged(size_t s) { return allocate(s, PAGE_XTAGGED); }
|
||||
void *GC_malloc_array_tagged(size_t s) { return allocate(s, PAGE_TARRAY); }
|
||||
void *GC_malloc_atomic(size_t s) { return allocate(s, PAGE_ATOMIC); }
|
||||
void *GC_malloc_atomic_uncollectable(size_t s) { return malloc(s); }
|
||||
void *GC_malloc_atomic_uncollectable(size_t s) { void *p = malloc(s); memset(p, 0, s); return p; }
|
||||
void *GC_malloc_allow_interior(size_t s) {return allocate_big(s, PAGE_ARRAY);}
|
||||
void *GC_malloc_atomic_allow_interior(size_t s) {return allocate_big(s, PAGE_ATOMIC);}
|
||||
void *GC_malloc_tagged_allow_interior(size_t s) {return allocate_big(s, PAGE_TAGGED);}
|
||||
|
|
Loading…
Reference in New Issue
Block a user