com.tapina.robe.swi.clib.stdlib
Class ReAlloc
java.lang.Object
com.tapina.robe.runtime.Block
com.tapina.robe.runtime.CodeBlock
com.tapina.robe.swi.clib.Stub
com.tapina.robe.swi.clib.stdlib.ReAlloc
- All Implemented Interfaces:
- Executable
- public class ReAlloc
- extends Stub
This function changes the size of a space initially allocated with calloc , malloc , or realloc. It takes a
pointer to the space in a1, and a new size in a2. The contents of the space are unaltered (although they
may be chopped off the new size is smaller). Any new bytes allocated have undefined values. The space may be
moved rather than just extended and so this function returns a new pointer.
If a1 is NULL then this function behaves as malloc , else if a2 is zero then this function behaves as free.
If the space cannot be reallocated then the contents are unchanged. However, the function will return NULL so
you will not be able to access the memory using the original pointer.
Returns: Pointer to space, or NULL if failed.
Fields inherited from class com.tapina.robe.swi.clib.Stub |
A1, A2, A3, A4, FP, IP, log, LR, PC, SL, SP, V1, V2, V3, V4, V5, V6 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReAlloc
public ReAlloc()
executeStub
public void executeStub(Environment environment)
- Specified by:
executeStub
in class Stub
Copyright © 2003-2005 . All Rights Reserved.