•  Back 
  •  GEMDOS Function Reference 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-FilePrusage()
Psetlimit()                                                          GEMDOS

Syntax

LONG Psetlimit( limit, value )
WORD limit;
LONG value;

Function      Psetlimit() reads/modifies resource allocation limits for
              the calling process and all of its children.

Opcode        287 (0x11F)

Availability  This function is available under all MiNT versions
              integrated with MultiTOS.

Parameters    limit defines the resource to read or modify as follows:

              Name         limit  Meaning

              LIM_MAXTIME    1    Maximum CPU time in milliseconds. If
                                  value is positive, value determines the
                                  new maximum. If value is 0, then the
                                  limit is set at 'unlimited'. If value is
                                  negative, the current value is returned
                                  but not modified.

              LIM_MAXMEM     2    Maximum total memory allowed for
                                  process. If value is positive, value
                                  determines the new maximum. If value is
                                  0, then the limit is set at 'unlimited'.
                                  If value is negative, the current value
                                  is returned but not modified.

              LIM_MAXMALLOC  3    Maximum total size of each Malloc
                                  (Mxalloc). If value is positive, value
                                  determines the new maximum. If value is
                                  0, then the limit is set at 'unlimited'.
                                  If value is negative, the current value
                                  is returned but not modified.

Binding       move.l   value,-(sp)
              move.w   limit,-(sp)
              move.w   #$11F,-(sp)
              trap     #1
              addq.l   #8,sp

Return Value  Psetlimit() returns the previous value or ERANGE (-64) if
              the value for limit was out of range.

Comments      The limits imposed by Psetlimit() are inherited from the
              parent by child processes.

See Also      Prusage()