top | item 45475798

(no title)

renehsz | 4 months ago

> It also assumes that the OS doesn't lie to the application when allocations fail.

Gotta do the good ol'

  echo 2 >/proc/sys/vm/overcommit_memory
and maybe adjust overcommit_ratio as well to make sure the memory you allocated is actually available.

discuss

order

pjmlp|4 months ago

OS specific hack and unrelated to C.

tredre3|4 months ago

Your comment was also OS-specific because Windows doesn't lie to applications about failed allocations.