com.tapina.robe.swi.clib.stdlib
Class ReAlloc

java.lang.Object
  extended bycom.tapina.robe.runtime.Block
      extended bycom.tapina.robe.runtime.CodeBlock
          extended bycom.tapina.robe.swi.clib.Stub
              extended bycom.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.


Field Summary
 
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
 
Constructor Summary
ReAlloc()
           
 
Method Summary
 void executeStub(Environment environment)
           
 
Methods inherited from class com.tapina.robe.swi.clib.Stub
execute, executeSubroutine, setAddress
 
Methods inherited from class com.tapina.robe.runtime.CodeBlock
isExtendable
 
Methods inherited from class com.tapina.robe.runtime.Block
getAddress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReAlloc

public ReAlloc()
Method Detail

executeStub

public void executeStub(Environment environment)
Specified by:
executeStub in class Stub


Copyright © 2003-2005 . All Rights Reserved.