diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-11-13 00:37:06 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-11-13 00:37:06 +0000 |
commit | aaa3a0caa6c3e4dacd950e2dc3c1691222c50965 (patch) | |
tree | 29a1db6d098446f3798ec89ae2cbedb5e6cfc4c4 /src/backend | |
parent | 266c3679f744b3efea534bd6f656ed1a6600a899 (diff) | |
download | postgresql-aaa3a0caa6c3e4dacd950e2dc3c1691222c50965.tar.gz postgresql-aaa3a0caa6c3e4dacd950e2dc3c1691222c50965.zip |
Split MemSet into three parts to constant comparisons can be optimized
away by the compiler; used by palloc0.
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/utils/mmgr/mcxt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c index d2432c00688..313a6ad56dd 100644 --- a/src/backend/utils/mmgr/mcxt.c +++ b/src/backend/utils/mmgr/mcxt.c @@ -14,7 +14,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.35 2002/11/10 02:17:25 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.36 2002/11/13 00:37:06 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -453,14 +453,14 @@ MemoryContextAlloc(MemoryContext context, Size size) } /* - * MemoryContextAllocZero + * MemoryContextAllocPalloc0 * Like MemoryContextAlloc, but clears allocated memory * * We could just call MemoryContextAlloc then clear the memory, but this * function is called too many times, so we have a separate version. */ void * -MemoryContextAllocZero(MemoryContext context, Size size) +MemoryContextAllocPalloc0(MemoryContext context, Size size) { void *ret; @@ -471,7 +471,7 @@ MemoryContextAllocZero(MemoryContext context, Size size) (unsigned long) size); ret = (*context->methods->alloc) (context, size); - MemSet(ret, 0, size); + MemSetLoop(ret, 0, size); return ret; } |