Unix Programming - Re: apparent 4 GB memory limit for brk() in solaris 8 on some hardware...?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > July 2005 > Re: apparent 4 GB memory limit for brk() in solaris 8 on some hardware...?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: apparent 4 GB memory limit for brk() in solaris 8 on some hardware...?
Grumble

2005-07-29, 6:01 pm

Stefaan A Eeckels wrote:
> When brk() returns ENOMEM it means that RLIMIT_DATA (the program's
> maximum heap size, set with setrlimit()) would be exceeded. Run the
> following program on the machine on which it works, and the one on
> which it doesn't work, and compare the results:
>
> #include <stdio.h>
> #include <sys/resource.h>
>
> int main() {
>
> struct rlimit rl;
>
> getrlimit(RLIMIT_DATA, &rl);
> printf("Hard limit: 0x%lx (%lu)\nSoft limit: 0x%lx (%lu)\n",
> rl.rlim_max, rl.rlim_max, rl.rlim_cur, rl.rlim_cur);
> return 0;
> }


Would ulimit -a (in bash) provide the same information?
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com