File: memory_limits.out

package info (click to toggle)
pljs 1.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,916 kB
  • sloc: ansic: 69,358; javascript: 5,408; sql: 880; makefile: 446; sh: 123
file content (27 lines) | stat: -rw-r--r-- 1,027 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
do $$
  const limit = pljs.execute(`select setting from pg_settings where name = $1`, ['pljs.memory_limit'])[0].setting;
  const a = new ArrayBuffer(limit*1024*1024/2);
$$ language pljs;
do $$
  const limit = pljs.execute(`select setting from pg_settings where name = $1`, ['pljs.memory_limit'])[0].setting;
  const a = new ArrayBuffer(limit*1024*1024/2);
$$ language pljs;
do $$
  const limit = pljs.execute(`select setting from pg_settings where name = $1`, ['pljs.memory_limit'])[0].setting;
  const a = new ArrayBuffer(limit*1024*1024);
$$ language pljs;
ERROR:  execution error
DETAIL:  InternalError: out of memory
    at <anonymous> (<function>:3:28)
    at <eval> (<function>:4:3)

do $$
  const limit = pljs.execute(`select setting from pg_settings where name = $1`, ['pljs.memory_limit'])[0].setting;
  const a = new ArrayBuffer(limit*1024*1024/1.5);
  const s = [];
  while(true) {
    s.push(new ArrayBuffer(63)) // small non-aligned allocations
  }
$$ language pljs;
ERROR:  execution error
DETAIL:  out of memory