Macaulay2 Engine
Loading...
Searching...
No Matches

◆ stats()

void stash::stats ( buffer & o)
static

Definition at line 93 of file mem.cpp.

94{
95 // o << "total space allocated from system = " << engine_allocated << endl;
96 // o << "number of global delete's = " << engine_dealloc << endl;
97 int n = (slab::n_slabs * slab_size) / 1024 +
99 o << "size of each slab = " << sizeof(slab) << newline;
100 o << "total engine stash space allocated = " << n << "k" << newline;
101
102 if (n > 0)
103 {
104 const int N = 200;
105 char s[N];
106 snprintf(s, N,
107 "%16s %10s %10s %10s %10s %10s %10s %10s%s",
108 "stash",
109 "k total",
110 "k in use",
111 "size",
112 "nalloc",
113 "inuse",
114 "highwater",
115 "freed",
116 newline);
117 o << s;
118 }
119}
static int n_slabs
Definition mem.hpp:69
void size_t s
Definition m2-mem.cpp:271
char newline[]
Definition m2-types.cpp:49
static int deleted_amount
Definition mem.cpp:7
static int allocated_amount
Definition mem.cpp:6
const int slab_size
Definition mem.hpp:44

References allocated_amount, deleted_amount, slab::n_slabs, newline, s, and slab_size.

Referenced by dstash(), engineMemory(), and F4Computation::show().