summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-03-13 13:28:29 +0100
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:56 +0200
commit35260b7ff2dc15a5194758ab6f3c73fbfb40acb3 (patch)
tree0a9151a42a3358c02baff0823a236b867da76777 /malloc.c
parentdd7e62d18a06b7b12084e5db795ac9d43a366341 (diff)
2011-03-13 Ivan Maidanski <ivmai@mail.ru>
* finalize.c (GC_register_finalizer_inner): Fix a typo in a comment. *include/private/gcconfig.h (STACKBOTTOM): Ditto. * gcj_mlc.c (GC_core_gcj_malloc): Replace 0/1 with TRUE/FALSE in EXPECT (the 2nd argument). * malloc.c (GC_core_malloc_atomic, GC_core_malloc, GC_free): Ditto. * mark.c (GC_mark_and_push, GC_mark_and_push_stack): Ditto. * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Ditto. * include/private/gc_hdrs.h (HC_GET_HDR): Ditto. * include/private/gc_priv.h (SMALL_OBJ): Ditto. * include/private/specific.h (getspecific): Ditto. * pthread_support.c (LOCK_STATS): Add a comment.
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/malloc.c b/malloc.c
index f6a3f3f..8109c99 100644
--- a/malloc.c
+++ b/malloc.c
@@ -182,7 +182,7 @@ GC_API void * GC_CALL GC_generic_malloc(size_t lb, int k)
} else {
# ifdef THREADS
/* Clear any memory that might be used for GC descriptors */
- /* before we release the lock. */
+ /* before we release the lock. */
((word *)result)[0] = 0;
((word *)result)[1] = 0;
((word *)result)[GRANULES_TO_WORDS(lg)-1] = 0;
@@ -219,7 +219,7 @@ GC_API void * GC_CALL GC_generic_malloc(size_t lb, int k)
lg = GC_size_map[lb];
opp = &(GC_aobjfreelist[lg]);
LOCK();
- if( EXPECT((op = *opp) == 0, 0) ) {
+ if (EXPECT((op = *opp) == 0, FALSE)) {
UNLOCK();
return(GENERAL_MALLOC((word)lb, PTRFREE));
}
@@ -271,9 +271,9 @@ GC_API char * GC_CALL GC_strdup(const char *s)
lg = GC_size_map[lb];
opp = (void **)&(GC_objfreelist[lg]);
LOCK();
- if( EXPECT((op = *opp) == 0, 0) ) {
+ if (EXPECT((op = *opp) == 0, FALSE)) {
UNLOCK();
- return(GENERAL_MALLOC((word)lb, NORMAL));
+ return (GENERAL_MALLOC((word)lb, NORMAL));
}
GC_ASSERT(0 == obj_link(op)
|| ((word)obj_link(op)
@@ -426,7 +426,7 @@ GC_API void GC_CALL GC_free(void * p)
ngranules = BYTES_TO_GRANULES(sz);
knd = hhdr -> hb_obj_kind;
ok = &GC_obj_kinds[knd];
- if (EXPECT((ngranules <= MAXOBJGRANULES), 1)) {
+ if (EXPECT(ngranules <= MAXOBJGRANULES, TRUE)) {
LOCK();
GC_bytes_freed += sz;
if (IS_UNCOLLECTABLE(knd)) GC_non_gc_bytes -= sz;