Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Memory limits in QNX

375 views
Skip to first unread message

Avi Kavas

unread,
Jul 4, 2000, 3:00:00 AM7/4/00
to
Suppose that I have many GB of RAM on my machine (as much as I want :-).
What is the maximum amount of memory that I can allocate ? (using malloc()
for example)

Thanks,
Avi.


Mitchell Schoenbrun

unread,
Jul 4, 2000, 3:00:00 AM7/4/00
to
Avi Kavas <ka...@cs.huji.ac.il> wrote:
> Suppose that I have many GB of RAM on my machine (as much as I want :-).
> What is the maximum amount of memory that I can allocate ? (using malloc()
> for example

The Watcom compiler uses a flat model so the entire amount of
memory used will be 2^^32, or about 4Gig. There are some areas of this
memory map that are reserved, and of course you will start with some
code and data. The rest could be filled up with malloc().

If you have more memory, there are ways to allocate more
memory in extra segents. These could be accessed by
far pointers.


Mitchell Schoenbrun --------- masc...@pobox.com

Avi Kavas

unread,
Jul 5, 2000, 3:00:00 AM7/5/00
to
Can you specify which areas in the 4Gig are reserved ? (e.g. top/bottom X bytes)
Where can I find the exact specification of QNX memory management ?

Thanks,
Avi.


 

Andre Koppel

unread,
Jul 5, 2000, 3:00:00 AM7/5/00
to
Using the flat-memory model there is no specific area of user-memory
reserved.
The physical memory is completely remapped for the user-processes. There
is
no need to know which parts of the physical memory is reserverd because
the
user-space programms do not directly access the physical memory (unlesse
u are doing hardware I/O (PCI, DMA ...).


Avi Kavas schrieb:

Avi Kavas

unread,
Jul 5, 2000, 3:00:00 AM7/5/00
to
So,
If I have 4GB of RAM, I can allocate with no problems 4GB-23MB(QNX memory
stamp).

Right ?

Avi.


"Andre Koppel" <ako...@akso.de> wrote in message
news:39632012...@akso.de...

Andre Koppel

unread,
Jul 5, 2000, 3:00:00 AM7/5/00
to
There are two things I am not absolutely sure about:
a) I must take a look into the technical manuals if the memory is addressed
signed or unsigned (31 or 32 Bit). Linux on x86 for example is only able to
address 2 GB of memory (if you have not the special version of SuSe/Siemens).
b) Currently I am not sure if each process begins at offset 0 within an own
virtual
address room or if all processes share one address room. But this makes no
difference with QNX because QNX4 did not support swapping and the memory
installed must be enough for all processes together.
But the normal case with QNX4 is: You may malloc as much memory as you like up
to the physical limits -the_offset, because there must be real memory there
for the virtual memory. There is no problem with holes within the real memory
because the virtual memory is completely remapped.

Avi Kavas schrieb:

Mitchell Schoenbrun

unread,
Jul 6, 2000, 3:00:00 AM7/6/00
to
Andre Koppel <ako...@akso.de> wrote:
> Using the flat-memory model there is no specific area of user-memory
> reserved.

In the past QNX had specific areas reserved so that libraries
could be mapped in at specific addresses. I presume that this
has not gone away, though I'm not sure about it.


--
Mitchell Schoenbrun --------- masc...@pobox.com

Mitchell Schoenbrun

unread,
Jul 6, 2000, 3:00:00 AM7/6/00
to
> Can you specify which areas in the 4Gig are reserved ? (e.g. top/bottom X
> bytes)
> Where can I find the exact specification of QNX memory management ?

Unfortunately I don't know the specifics. I think that amount
that fits this category is trivial next to the approximately 4Gig
maximum. I mentioned it only for completeness so that if you
find that you are down a meg or two, there will be no cause
for alarm. Do you actually anticipate a > 4Gig machine?

Bill at Sierra Design

unread,
Jul 11, 2000, 3:00:00 AM7/11/00
to
What I think that you'll find is that certain PCI (and other) devices grab a
certain small amount of memory at various places way up there. I don't
think that you would have a problem if you were to stick 4GB of memory in a
box. But don't quote me on that. Whatever you buy, either try it in the
store first or make sure that it is returnable.

Mitchell Schoenbrun <masc...@tsoft.com> wrote in message
news:sm7jkmk...@corp.supernews.com...

Andrew Thomas

unread,
Jul 11, 2000, 3:00:00 AM7/11/00
to
Mitchell Schoenbrun <masc...@tsoft.com> writes:

> Andre Koppel <ako...@akso.de> wrote:
> > Using the flat-memory model there is no specific area of user-memory
> > reserved.
>
> In the past QNX had specific areas reserved so that libraries
> could be mapped in at specific addresses. I presume that this
> has not gone away, though I'm not sure about it.

No, this has not gone away. The shared libraries are non-relocatable,
so the application has to ensure that it does not map in memory that
would overlay a shared library. This is actually enforced by the
Watcom linker. When the application is built, any shared libraries
linked against it are queried for their offsets, and then the linker
relocates the application code segment to be safely above any of the
shared libraries in memory.

-----
Andrew Thomas, President, Cogent Real-Time Systems Inc.
2430 Meadowpine Boulevard, Suite 105, Mississauga, Ontario, Canada L5N 6S2
Email: and...@cogent.ca WWW: http://www.cogent.ca

0 new messages