Top
Back: D.2.2.7 fibonacci
Forward: D.2.2.9 killall
FastBack: Appendix D SINGULAR libraries
FastForward: E Release Notes
Up: D.2.2 general_lib
Top: 1 Preface
Contents: Table of Contents
Index: F Index
About: About This Document

D.2.2.8 kmemory

Procedure from library general.lib (see section general_lib).

Usage:

kmemory([n,[v]]); n,v integers

Return:

memory in kilobyte of type int
n=0: memory used by active variables (same as no parameters)
n=1: total memory allocated by Singular
n=2: difference between top and init memory address (sbrk memory)
n!=0,1,2: 0

Display:

detailed information about allocated and used memory if v!=0

Note:

kmemory uses internal function ’memory’ to compute kilobyte, and is the same as ’memory’ for n!=0,1,2

Example:

LIB "general.lib";
kmemory();
→ 152
kmemory(1,1);
→ // total memory allocated, at the moment, by SINGULAR (kilobyte):
→ 650

Top Back: D.2.2.7 fibonacci Forward: D.2.2.9 killall FastBack: Appendix D SINGULAR libraries FastForward: E Release Notes Up: D.2.2 general_lib Top: 1 Preface Contents: Table of Contents Index: F Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texinfo.