pjs.realloc()



This API reallocates storage.

Parameters

  1. Pointer name - The name of a Profound.js pointer field that points to a buffer allocated with pjs.alloc().

  2. New size - The desired size of the buffer.

Exception Handling

An Error will be thrown if there are any problems reallocating the buffer.

Example

Reallocate a buffer
pjs.define("p_storage", {type: "pointer"});   // Allocate 10 bytes. p_storage = pjs.alloc(10);   // Increase buffer size to 20 bytes. pjs.realloc(p_storage, 20);

RPG Equivalent 

REALLOC, %REALLOC()