Recent

Author Topic: Memory Allocated on Linux only max 100 MB?  (Read 2428 times)

Yakumo500

  • New Member
  • *
  • Posts: 30
Memory Allocated on Linux only max 100 MB?
« on: May 28, 2014, 02:36:33 pm »
Hi,
I'm working on a database engine for university and noted some problems with memory allocation.
While I can allocate 1,5 GB on Windows, Linux lets me only allocate ca. 100 MB although I called GetMem three times with 512 MB. I've already tried the -Ch switch but this didn't work either.

I'm running Kubuntu 14.04 with kernel version 3.13.0-27. FPC version is 2.7 (trunc)

I hope you have some ideas how I can fix this problem.

PS: I used cmem with the same result.
« Last Edit: May 28, 2014, 11:38:50 pm by Yakumo500 »

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7505
Re: Memory Allocated on Linux only max 100 MB?
« Reply #1 on: May 28, 2014, 02:50:20 pm »
Type

ulimit -a

followed by a

man ulimit

on the prompt.

I'm on FreeBSD here, but I assume under Linux it is the same, and the datasegment limit is -d (and typically 512MB)

Yakumo500

  • New Member
  • *
  • Posts: 30
Re: Memory Allocated on Linux only max 100 MB?
« Reply #2 on: May 28, 2014, 04:40:52 pm »
I've tried your advice. However the command prints the following:

Code: [Select]
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 22812
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 22812
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

As the output says the data seg size is unlimited

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7505
Re: Memory Allocated on Linux only max 100 MB?
« Reply #3 on: May 28, 2014, 11:04:44 pm »
I assume you ran it as the same user as your commands run (limits for root differ from mortal users).

If so, try to strace the generate program to see which call fails (and hopefully, get an error value why)

Yakumo500

  • New Member
  • *
  • Posts: 30
Re: Memory Allocated on Linux only max 100 MB?
« Reply #4 on: May 28, 2014, 11:38:29 pm »
Thank your for your answer. As it turned out the KDE task manager shows a wrong value in column memory  :o. If I add the column virtual size ("Virtuelle Größe") the real allocated memory is shown