Next: , Previous: cpg-ref-SP_read_from_string, Up: cpg-bif

12.3.88 SP_realloc()


     #include <sicstus/sicstus.h>
     void *
     SP_realloc(void *ptr,
                size_t size);

Changes the size of the block referenced by ptr to size bytes and returns a pointer to the (possibly moved) block. The contents will be unchanged up to the lesser of the new and old sizes. The block referenced by ptr must have been obtained by a call to SP_malloc() or SP_realloc(), and must not have been released by a call to SP_free() or SP_realloc().


The current block.
Requested number of bytes of the new block.

Return Value

NULL on failure, the pointer otherwise.

See Also

See OS Memory Management.

Send feedback on this subject.