diff options
Diffstat (limited to 'lib/ds')
-rw-r--r-- | lib/ds/plarena.c | 16 | ||||
-rw-r--r-- | lib/ds/plvrsion.c | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/ds/plarena.c b/lib/ds/plarena.c index a582ac63..e1edb134 100644 --- a/lib/ds/plarena.c +++ b/lib/ds/plarena.c @@ -74,15 +74,15 @@ PR_IMPLEMENT(void) PL_InitArenaPool( /* ** PL_ArenaAllocate() -- allocate space from an arena pool -** +** ** Description: PL_ArenaAllocate() allocates space from an arena -** pool. +** pool. ** ** First, try to satisfy the request from arenas starting at ** pool->current. Then try to allocate a new arena from the heap. ** ** Returns: pointer to allocated space or NULL -** +** ** Notes: The original implementation had some difficult to ** solve bugs; the code was difficult to read. Sometimes it's ** just easier to rewrite it. I did that. larryh. @@ -93,12 +93,12 @@ PR_IMPLEMENT(void) PL_InitArenaPool( PR_IMPLEMENT(void *) PL_ArenaAllocate(PLArenaPool *pool, PRUint32 nb) { - PLArena *a; + PLArena *a; char *rp; /* returned pointer */ PRUint32 nbOld; PR_ASSERT((nb & pool->mask) == 0); - + nbOld = nb; nb = (PRUword)PL_ARENA_ALIGN(pool, nb); /* force alignment */ if (nb < nbOld) @@ -117,8 +117,8 @@ PR_IMPLEMENT(void *) PL_ArenaAllocate(PLArenaPool *pool, PRUint32 nb) } while( NULL != (a = a->next) ); } - /* attempt to allocate from the heap */ - { + /* attempt to allocate from the heap */ + { PRUint32 sz = PR_MAX(pool->arenasize, nb); if (PR_UINT32_MAX - sz < sizeof *a + pool->mask) { a = NULL; @@ -133,7 +133,7 @@ PR_IMPLEMENT(void *) PL_ArenaAllocate(PLArenaPool *pool, PRUint32 nb) rp = (char *)a->avail; a->avail += nb; PR_ASSERT(a->avail <= a->limit); - /* the newly allocated arena is linked after pool->current + /* the newly allocated arena is linked after pool->current * and becomes pool->current */ a->next = pool->current->next; pool->current->next = a; diff --git a/lib/ds/plvrsion.c b/lib/ds/plvrsion.c index 8bbf6765..1af25417 100644 --- a/lib/ds/plvrsion.c +++ b/lib/ds/plvrsion.c @@ -86,7 +86,7 @@ PR_IMPLEMENT(const PRVersionDescription*) libVersionPoint() * from being optimized away as unused variables. */ const char *dummy; - + dummy = rcsid; dummy = sccsid; #endif |