2008-09-18 5 views

Répondre

3

Lors de la création d'un RTP via rtpSpawn(), vous pouvez spécifier une variable d'environnement qui contrôle le comportement du tas.
Il y a 3 variables d'environnement:

 
HEAP_INITIAL_SIZE - How much heap to allocate initially (defaults to 64K) 
HEAP_MAX_SIZE  - Maximum heap to allocate (defaults to no limit) 
HEAP_INCR_SIZE - memory increment when adding to RTP heap (defaults to 1 virtual page) 

The following code shows how to use the environment variables: 

    char * envp[] = {"HEAP_INITIAL_SIZE=0x20000", "HEAP_MAX_SIZE=0x100000", NULL); 
    rtpSpawn ("myrtp.vxe", NULL, envp, 100, 0x10000, 0, 0); 
 
+0

taille du tas initial pour un noyau est 4Ko. – Praneeth

0

Cela peut être fait par l'utilisation de la variable d'environnement HEAP_MAX_SIZE. Si elle est définie, elle limite la capacité du tas à croître au-delà de cette taille. Cependant, il ne limite pas la taille initiale du tas.

See page 31

Questions connexes