source: trunk/src/emx/src/lib/malloc/expand.c@ 2254

Last change on this file since 2254 was 2254, checked in by bird, 20 years ago

o LIBC_ASSERT*() are for internal libc errors, LIBCLOG_ERROR*() are

for user related error. Big code adjustements.

o Fixed a few smaller issues.
o Started fixing exec() backend.

  • Property cvs2svn:cvs-rev set to 1.5
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 718 bytes
Line 
1/* expand.c (emx+gcc) -- Copyright (c) 1996 by Eberhard Mattes */
2
3#include "libc-alias.h"
4#include <stdlib.h>
5#include <stddef.h>
6#include <umalloc.h>
7#include <sys/builtin.h> /* For <sys/fmutex.h> */
8#include <sys/fmutex.h>
9#include <emx/umalloc.h>
10#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_HEAP
11#include <InnoTekLIBC/logstrict.h>
12
13/* this is not a standard function! Thus the prototype. */
14void *expand(void *block, size_t new_size);
15
16void *_STD(expand)(void *block, size_t new_size)
17{
18 LIBCLOG_ENTER("block=%p new_size=%d\n", block, new_size);
19 void *pvRet = _um_realloc(block, new_size, 4, _UMFI_NOMOVE);
20 if (pvRet || new_size)
21 LIBCLOG_RETURN_P(pvRet);
22 LIBCLOG_ERROR_RETURN_P(pvRet);
23}
Note: See TracBrowser for help on using the repository browser.