pjs.alloc()



Allocates buffer storage that can be assigned to a pointer field.

Parameters
  1. Length of buffer (Number)

Return Value

Returns a JavaScript Buffer object

Example

pjs.define("ptr", { type: 'pointer' }); ptr = pjs.alloc(25);


RPG Equivalent 

ALLOC, %ALLOC()