[Python-checkins] python/dist/src/Objects obmalloc.c,2.40,2.41
tim_one@sourceforge.net
tim_one@sourceforge.net
Thu, 18 Apr 2002 14:37:05 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv17970/python/Objects
Modified Files:
obmalloc.c
Log Message:
Remove some long-disabled debugging boilerplate.
Index: obmalloc.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/obmalloc.c,v
retrieving revision 2.40
retrieving revision 2.41
diff -C2 -d -r2.40 -r2.41
*** obmalloc.c 13 Apr 2002 08:29:14 -0000 2.40
--- obmalloc.c 18 Apr 2002 21:37:03 -0000 2.41
***************
*** 417,441 ****
static block *arenabase = NULL;
- #if 0
- static ulong wasmine = 0;
- static ulong wasntmine = 0;
-
- static void
- dumpem(void *ptr)
- {
- if (ptr)
- printf("inserted new arena at %08x\n", ptr);
- printf("# arenas %u\n", narenas);
- printf("was mine %lu wasn't mine %lu\n", wasmine, wasntmine);
- }
- #define INCMINE ++wasmine
- #define INCTHEIRS ++wasntmine
-
- #else
- #define dumpem(ptr)
- #define INCMINE
- #define INCTHEIRS
- #endif
-
/* Allocate a new arena and return its base address. If we run out of
* memory, return NULL.
--- 417,420 ----
***************
*** 528,532 ****
arenas[narenas] = (uptr)bp;
++narenas; /* can't overflow, since narenas < maxarenas before */
- dumpem(bp);
return bp;
--- 507,510 ----
***************
*** 729,733 ****
/* We allocated this address. */
LOCK();
- INCMINE;
/*
* Link p to the start of the pool's freeblock list. Since
--- 707,710 ----
***************
*** 790,794 ****
/* We didn't allocate this address. */
- INCTHEIRS;
free(p);
}
--- 767,770 ----
***************
*** 813,817 ****
if (ADDRESS_IN_RANGE(p, pool->arenaindex)) {
/* We're in charge of this block */
- INCMINE;
size = INDEX2SIZE(pool->szidx);
if (size >= nbytes)
--- 789,792 ----
***************
*** 828,832 ****
}
/* We're not managing this block. */
- INCTHEIRS;
if (nbytes <= SMALL_REQUEST_THRESHOLD) {
/* Take over this block. */
--- 803,806 ----