FileDocCategorySizeDatePackage
Stdlib.javaAPI DocApache Tomcat 6.0.142851Fri Jul 20 04:20:34 BST 2007org.apache.tomcat.jni

Stdlib

public class Stdlib extends Object
Stdlib
author
Mladen Turk
version
$Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $

Fields Summary
Constructors Summary
Methods Summary
public static native longcalloc(long num, int sz)
Allocates an array in memory with elements initialized to 0.

param
num Number of elements.
param
sz Length in bytes of each element.

public static native voidfree(long mem)
Deallocates or frees a memory block.

param
mem Previously allocated memory block to be freed.

public static native intgetpid()
Get current process pid.

return
current pid or < 1 in case of error.

public static native intgetppid()
Get current process parent pid.

return
parent pid or < 1 in case of error.

public static native longmalloc(int sz)
Allocates memory blocks.

param
sz Bytes to allocate.

public static native booleanmemread(byte[] dst, long src, int sz)
Read from plain memory

param
dst Destination byte array
param
src Source memory address
param
sz Number of bytes to copy.

public static native booleanmemset(long dst, int c, int sz)
Sets buffers to a specified character

param
dst Destination memory address
param
c Character to set.
param
sz Number of characters.

public static native booleanmemwrite(long dst, byte[] src, int sz)
Write to plain memory

param
dst Destination memory address
param
src Source byte array
param
sz Number of bytes to copy.

public static native longrealloc(long mem, int sz)
Reallocate memory blocks.

param
mem Pointer to previously allocated memory block.
param
sz New size in bytes.