swapctl - working ???

I tried to use the swapctl within the rc.sysinit to add the swapping feature
to my system.
I just tired to use: swapctl -c -a/.swapfile -S32M
running a test that allocates the memory step by step, unfortunately I had
to find out that my test will dump after the pyhsical memory exhausted (the
system has 32MB RAM).
So I guess that swapping is not working.
Am I missing something? or am I doing something wrong?
How will I get swapping to work?
Any hints
TIA
hp

You need to enable swap in your test program.

munlockall()

chris


HP Reichert <hp.reichert@idearemovesoft.de> wrote:

I tried to use the swapctl within the rc.sysinit to add the swapping feature
to my system.
I just tired to use: swapctl -c -a/.swapfile -S32M
running a test that allocates the memory step by step, unfortunately I had
to find out that my test will dump after the pyhsical memory exhausted (the
system has 32MB RAM).
So I guess that swapping is not working.
Am I missing something? or am I doing something wrong?
How will I get swapping to work?
Any hints
TIA
hp

cdm@qnx.com > “The faster I go, the behinder I get.”

Chris McKillop – Lewis Carroll –
Software Engineer, QSSL
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Chris McKillop <cdm@qnx.com> wrote in article <9tsr7r$7nq$1@nntp.qnx.com>…

You need to enable swap in your test program.

munlockall()

chris

How can I enable swap for GCC? Is any options to enable this feature in such memory aggressive
program?
Thanks
Eduard.

I’ve seen this in an other article, but as I’ve looked into the online help
it says that munlockall() function isn’t currently supported.
Is this a leak in documentation or in coding? I’ll try it anyway.
One further question:
as my application is multi threaded and the description in the online help
says that it unlocks a process’s address space I’ll guess that I have to
call this function only once within my starting main, and not for every
started thread?
Is this correct?
hp

“Chris McKillop” <cdm@qnx.com> schrieb im Newsbeitrag
news:9tsr7r$7nq$1@nntp.qnx.com

You need to enable swap in your test program.

munlockall()

chris


HP Reichert <> hp.reichert@idearemovesoft.de> > wrote:

I tried to use the swapctl within the rc.sysinit to add the swapping
feature
to my system.
I just tired to use: swapctl -c -a/.swapfile -S32M
running a test that allocates the memory step by step, unfortunately I
had
to find out that my test will dump after the pyhsical memory exhausted
(the
system has 32MB RAM).
So I guess that swapping is not working.
Am I missing something? or am I doing something wrong?
How will I get swapping to work?
Any hints
TIA
hp


\

cdm@qnx.com > “The faster I go, the behinder I get.”
Chris McKillop – Lewis Carroll –
Software Engineer, QSSL

It’s sole purpose was to allow gcc to run
properly (which could change in the near future).

So the next version won’t run properly ?

LOL!

“HP Reichert” <hp.reichert@ideaREMOVEsoft.de> wrote in message
news:9ttg1i$fc1$1@inn.qnx.com

I’ve seen this in an other article, but as I’ve looked into the online
help
it says that munlockall() function isn’t currently supported.
Is this a leak in documentation or in coding? I’ll try it anyway.

munlockall() isn’t supported, and isn’t guaranteed to be available on
furture revisions of QNX. It’s sole purpose was to allow gcc to run
properly (which could change in the near future).

as my application is multi threaded and the description in the online help
says that it unlocks a process’s address space I’ll guess that I have to
call this function only once within my starting main, and not for every
started thread?
Is this correct?

Yes, but the swapping should not be used in a product for public
consumption.

-Adam

“Mario Charest” <mcharest@clipzinformatic.com> wrote in message
news:9tto14$kbg$1@inn.qnx.com

It’s sole purpose was to allow gcc to run
properly (which could change in the near future).


So the next version won’t run properly ?

LOL!

Perhaps that should have be reworded - the existance of the swapping could
change and/or be removed. Thanks for pointing that out Mario :slight_smile:

-Adam

“Operating System Tech Support” <os@qnx.com> wrote in message
news:9ttnb5$pn8$1@nntp.qnx.com

“HP Reichert” <> hp.reichert@ideaREMOVEsoft.de> > wrote in message
news:9ttg1i$fc1$> 1@inn.qnx.com> …
I’ve seen this in an other article, but as I’ve looked into the online
help
it says that munlockall() function isn’t currently supported.
Is this a leak in documentation or in coding? I’ll try it anyway.

munlockall() isn’t supported, and isn’t guaranteed to be available on
furture revisions of QNX. It’s sole purpose was to allow gcc to run
properly (which could change in the near future).

That is quite a news. mlock/munlock/munlocall/msync are part of POSIX.

as my application is multi threaded and the description in the online
help
says that it unlocks a process’s address space I’ll guess that I have to
call this function only once within my starting main, and not for every
started thread?
Is this correct?

Yes, but the swapping should not be used in a product for public
consumption.

I thought you guys are working on a better VM (so swapping could be
reliable). Indeed, Gilotine is a fine medication for headache.

  • igor

ed1k <ed1k@yahoo.com> wrote in article 01c17651$889550c0$106fa8c0@ED1K

Chris McKillop <> cdm@qnx.com> > wrote in article <9tsr7r$7nq$> 1@nntp.qnx.com> >…
You need to enable swap in your test program.

munlockall()

chris


How can I enable swap for GCC? Is any options to enable this feature in such memory aggressive
program?

Seems gcc is only a program which use swap. I have done some test in my system. I launched app
which occupy all of memory ecxept a few megs for shell. (Previously running shell really cannot do
anything without those free megs. cd works, ls does not work - “Not enough memory”). Then I launch
gcc to compile project and try to view swapctl’s statistic. I do not believe ‘swapctl -s’ prints
out the right statistic. BTW, sometimes I’ve got “Can’t fork - try again”.
Eduard.