Subject: Re: problems with swap in 2.0.33?

From: Vincent PENNE <[email-masked]>
Date: Fri, 19 Jun 1998 17:33:10 +0200

Stefan Hanske wrote:
> 
> I've tried to compile lesstif and I know the problem. I can remember it
> has to do with the older machines and the max. tasksize of 10 MB for
> those. One solution could be to type `ulimit` which should tell linux
> that it can give more than a 10 MB for programs.

No, the problem comes from the use of shared library with a.out format :
gcc in the standard arm-linux distribution use the shared version of
libc. Since the a.out libc shared library is located on a fixed address
(about at 12Mb), a program using it cannot allocate more than 12Mb of
memory. I have compiled a new version of gcc, but a static version,
which is now able to alocate far more memory (it has been up to 50Mb of
virtual memory used !) Of course, the executables of gcc are now a bit
bigger, since they contain the libc library, but as they are quite big
anyway, it doesn't make a big difference ...

 Vincent.

-- 
/==========================================================\
|     Vincent PENNE,          Centre de Physique Theorique |
|Tel. (0033)4 91 26 95 04       CNRS - LUMINY - Case 907   |
|Fax. (0033)4 91 26 95 53      F-13288 MARSEILLE CEDEX 9   |
|Email: [email-masked]          FRANCE              |
|http://www.cpt.univ-mrs.fr                                |
\==========================================================/
unsubscribe: body of `unsubscribe linux-arm' to [email-masked]

---

From: Paul Koning <[email-masked]>
Date: Mon, 22 Jun 1998 09:10:34 -0400

>>>>> "Vincent" == Vincent PENNE <[email-masked]> writes:

 Vincent> Stefan Hanske wrote:
 >>  I've tried to compile lesstif and I know the problem. I can
 >> remember it has to do with the older machines and the
 >> max. tasksize of 10 MB for those. One solution could be to type
 >> `ulimit` which should tell linux that it can give more than a 10
 >> MB for programs.

 Vincent> No, the problem comes from the use of shared library with
 Vincent> a.out format : gcc in the standard arm-linux distribution
 Vincent> use the shared version of libc. Since the a.out libc shared
 Vincent> library is located on a fixed address (about at 12Mb), a
 Vincent> program using it cannot allocate more than 12Mb of memory.

Curious... why couldn't the allocator skip the space taken by libc and 
continue allocating after whatever place it ends?

	paul

---

From: Russell King - ARM Linux Admin <[email-masked]>
Date: Thu, 25 Jun 1998 21:58:18 +0100 (BST)

> continue allocating after whatever place it ends?

Because the allocator asks the kernel for more memory, and the kernel
just says 'sorry, I've only got 12MB to give you'.  The brk man page
doesn't give much information, but basically the data segment can only
be extended up until the next object present in the memory map (which
happens to be the C Library at 12MB).
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [email-masked]      --- ---
  | | | |  http://www.arm.uk.linux.org/~rmk/armlinux.html    /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |