This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] Allow shrinking of arena heaps using mmap based onovercommit settings when available


On Fri, Aug 24, 2012 at 08:56:28PM +0530, Siddhesh Poyarekar wrote:
> +  int fd = open_not_cancel_2 ("/proc/sys/vm/overcommit_memory",
> +			      O_RDONLY | O_CLOEXEC);
> +
> +  if (fd != -1)
> +    {
> +      char val = 0;
> +      int n = read_not_cancel (fd, &val, 1);
> +
> +      may_shrink_heap = (n > 0 && val == 2);

Don't you mean '2', not 2?

Rich


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]