[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: shared memory load address and gcl

Greetings, and thanks so much for your reply!

I think my conceptual question is now clearer.  My experience with
linux tells me that sbrk'ed memory cannot overrun the address used for
shared memory maps.  But on asdfasdf, there appears at first blush no
such problem.  Can this possibly be right?  Should I ignore this
apparent ceiling to the lisp heap on bsd?

#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/resource.h>

int main() {
  struct rlimit rl;
  void *p,*p1,*p2;

  getrlimit(RLIMIT_DATA, &rl);
  p=(void *)sbrk(0);
  p1=(void *)sbrk(0x1000000);
  p2=(void *)sbrk(0x1000000);
  printf("%ld %ld %p %p %p\n",rl.rlim_cur,rl.rlim_max,p,p1,p2);

  return 0;

34359738368 34359738368 0x600a88 0x600a88 0x1600a88

echo $?

ldd ./yy
libc.so.0.1 => /lib/libc.so.0.1 (0x0000000801256000)
/lib/ld-kfreebsd-x86-64.so.1 => /lib64/ld-kfreebsd-x86-64.so.1 (0x0000000001021000)

Thanks again!
Camm Maguire			     		    camm@maguirefamily.org
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

Reply to: