#14492: Tiered memory allocation restricts available memory -------------------------------------+------------------------------------- Reporter: unode | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.4.1 Component: Runtime System | Version: 8.0.2 Resolution: | Keywords: memory ulimit Operating System: Linux | Architecture: x86_64 Type of failure: Poor/confusing | (amd64) error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4215 Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Another option, as suggested by Jaffacake on Diff:D4215, would be to probe the limit. This test program {{{#!c #include <stdlib.h> #include <stdio.h> #include <sys/time.h> #include <sys/resource.h> void print_limit(const char* name, int resource) { struct rlimit lim; if (getrlimit(resource, &lim) != 0) { printf("%s: uh oh\n", name); exit(1); } printf("%s: cur: %d\n", name, lim.rlim_cur); printf("%s: max: %d\n", name, lim.rlim_max); } int main() { print_limit("AS", RLIMIT_AS); print_limit("DATA", RLIMIT_DATA); print_limit("RSS", RLIMIT_RSS); print_limit("STACK", RLIMIT_STACK); return 0; } }}} reveals that `ulimit -v` affects `RLIMIT_AS`, which can be probed with `getrlimit`. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14492#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler