Increase max data segment size?

2004-04-16 Thread Mark Kirkwood
Dear Questions:

I have a machine with 2G of ram. I would like to be able to malloc about 
half of it. However I keep running into the max data segment size 
limitation:

$ ulimit -d
524288
Is there any way to increase or amend this ?

I am running FreeBSD 4.9 RELEASE i386 with the following non default 
kernel options :

makeoptions   COPTFLAGS=-O2 -pipe -funroll-loops
options   SMP # Symmetric MultiProcessor Kernel
options   APIC_IO # Symmetric (APIC) I/O
regards

Mark

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Increase max data segment size?

2004-04-16 Thread Mark Kirkwood
I should have mentioned that I built the kernel when the machine had 
either 512M or 1G of ram, and have subsequently added another 1G. Would 
rebuilding the kernel result in this limit being recalculated?

Mark Kirkwood wrote:

Dear Questions:

I have a machine with 2G of ram. I would like to be able to malloc 
about half of it. However I keep running into the max data segment 
size limitation:

$ ulimit -d
524288

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Increase max data segment size?

2004-04-16 Thread Mark Kirkwood
Bit sad replying to myself again:-)

Anyway - no it does not... still 512M

A bit of grepping through the 4.9 source finds that the beast 
controlling all this is:

$ grep  MAXDSIZ /usr/src/sys/i386/include/vmparam.h
#ifndef MAXDSIZ
#define MAXDSIZ (512UL*1024*1024)   /* max data size */
so is there any reason *not* to amend this and recompile?

e.g.

#define MAXDSIZ (1024UL*1024*1024)   /* max data size now 1G */

any opinions out there?

regards

Mark

Mark Kirkwood replied to himself:

I should have mentioned that I built the kernel when the machine had 
either 512M or 1G of ram, and have subsequently added another 1G. 
Would rebuilding the kernel result in this limit being recalculated?


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Increase max data segment size?

2004-04-16 Thread Mark Kirkwood
Yes there is, some more poking around in /usr/src/sys/kern/subr_param.c 
brought to light :

   maxdsiz = MAXDSIZ;
   TUNABLE_QUAD_FETCH(kern.maxdsiz, maxdsiz);
which looked suspicously like a kernel tunable for data segment size.
So setting kern.maxdsiz in /etc/loader.conf seems to be the thing to do...
Of course by this time I have managed to find some postings concerning 
MAXDSIZ and kern.maxdsiz.

Hopefully the next person confused about this will find my postings 
*before* dredging the code!

regards

Mark

Mark Kirkwood wrote:

so is there any reason *not* to amend this and recompile?

e.g.

#define MAXDSIZ (1024UL*1024*1024)   /* max data size now 
1G */



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Increase max data segment size?

2004-04-16 Thread Mark Kirkwood
I mean in /boot/loader.conf  (growl...)

Mark Kirkwood wrote:

which looked suspicously like a kernel tunable for data segment size.
So setting kern.maxdsiz in /etc/loader.conf seems to be the thing to 
do...


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]