File: memory_limits.out

package info (click to toggle)
pljs 1.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,704 kB
  • sloc: ansic: 69,356; javascript: 5,408; sql: 878; makefile: 443; sh: 123
file content (28 lines) | stat: -rw-r--r-- 1,055 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
28
set pljs.memory_limit = 64;
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