![Netscape ENTERPRISE SERVER 6.1 Manual Download Page 168](http://html1.mh-extra.com/html/netscape/enterprise-server-6-1/enterprise-server-6-1_manual_1674653168.webp)
NSAPI Functions (in Alphabetical Order)
168
Netscape Enterprise Server NSAPI Programmer’s Guide • April 2002 (Draft)
PERM_REALLOC
The
PERM_REALLOC
macro is a platform-independent substitute for the C library
routine
realloc
. It changes the size of a specified memory block that was
originally created by
MALLOC
,
CALLOC
, or
STRDUP
. The contents of the object remains
unchanged up to the lesser of the old and new sizes. If the new size is larger, the
new space is uninitialized.
Warning
Calling
PERM_REALLOC
for a block that was allocated with
MALLOC
,
CALLOC
, or
STRDUP
will not work.
Syntax
void *PERM_REALLOC(vod *ptr, int size)
Returns
A void pointer to a block of memory
Parameters
void *ptr
a void pointer to a block of memory created by
PERM_MALLOC
,
PERM_CALLOC
, or
PERM_STRDUP
.
int size
is the number of bytes to which the memory block should be resized.
Example
char *name;
name = (char *) PERM_MALLOC(256);
if (NotBigEnough())
name = (char *) PERM_REALLOC(512);
See also
PERM_MALLOC, PERM_FREE, PERM_CALLOC, PERM_STRDUP, MALLOC, FREE,
STRDUP, CALLOC, REALLOC
PERM_STRDUP
The
PERM_STRDUP
macro is a platform-independent substitute for the C library
routine
strdup
. It creates a new copy of a string in memory that persists after the
request that is being processed has been completed. If pooled memory has been
disabled in the configuration file (with the
pool-init
built-in SAF),
PERM_STRDUP
and
STRDUP
both obtain their memory from the system heap.
Summary of Contents for ENTERPRISE SERVER 6.1
Page 1: ...NSAPI Programmer s Guide Netscape Enterprise Server Version6 1 April 2002 Draft...
Page 290: ...Miscellaneous 290 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 318: ...cinfo 318 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 336: ...Buffered Streams 336 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 344: ...344 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 350: ...350 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 356: ...356 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...