ls -R > test - Minix

This is a discussion on ls -R > test - Minix ; When I issues this command I get and "out of memory" error message. "ls -R > test" should list all directories and pipe them to a file called test. When I browse the file "test" it stops after it tries ...

+ Reply to Thread
Results 1 to 17 of 17

Thread: ls -R > test

  1. ls -R > test

    When I issues this command I get and "out of memory" error message.
    "ls -R > test" should list all directories and pipe them to a file
    called test.

    When I browse the file "test" it stops after it tries to list this
    entry - dtprint_fspec.ps in the library: usr/X11R6/lib/X11/doc/
    PostScript

    This is the equivalent of dir of the "c:" drive in DOS and I don't
    think it should hang on an "out of memory" message.

    Any thoughts?

    Peter


  2. Re: ls -R > test

    > When I issues this command I get and "out of memory" error message.
    > "ls -R > test" should list all directories and pipe them to a file
    > called test.
    >
    > When I browse the file "test" it stops after it tries to list this
    > entry - dtprint_fspec.ps in the library: usr/X11R6/lib/X11/doc/
    > PostScript
    >
    > This is the equivalent of dir of the "c:" drive in DOS and I don't
    > think it should hang on an "out of memory" message.
    >
    > Any thoughts?


    Have you tried chmem? Minix memory management is not really flexible
    right now, but that should change when virtual memory is implemented.

    On the other hand, one whould say that an efficient implementation of
    ls should not need much memory even when listing the entire file
    system. The source file for ls is found at commands/simple/ls.c in case
    you want to see if you can implement it more efficiently.

  3. Re: ls -R > test

    On Feb 6, 3:21 pm, "hal1401" wrote:
    > When I issues this command I get and "out of memory" error message.
    > "ls -R > test" should list all directories and pipe them to a file
    > called test.
    >
    > When I browse the file "test" it stops after it tries to list this
    > entry - dtprint_fspec.ps in the library: usr/X11R6/lib/X11/doc/
    > PostScript
    >
    > This is the equivalent of dir of the "c:" drive in DOS and I don't
    > think it should hang on an "out of memory" message.
    >
    > Any thoughts?
    >
    > Peter


    Hello,
    try adding more memory to command

    # chmem +8192 /usr/bin/ls

    Check with size how many memory it have before any change.

    May be that some buffer can not be allocated from stack.

    Regards,
    Claudio.


  4. Re: ls -R > test

    On Feb 6, 3:38 pm, ctantign...@gmail.com wrote:
    > On Feb 6, 3:21 pm, "hal1401" wrote:
    >
    > > When I issues this command I get and "out of memory" error message.
    > > "ls -R > test" should list all directories and pipe them to a file
    > > called test.

    >
    > > When I browse the file "test" it stops after it tries to list this
    > > entry - dtprint_fspec.ps in the library: usr/X11R6/lib/X11/doc/
    > > PostScript

    >
    > > This is the equivalent of dir of the "c:" drive in DOS and I don't
    > > think it should hang on an "out of memory" message.

    >
    > > Any thoughts?

    >
    > > Peter

    >
    > Hello,
    > try adding more memory to command
    >
    > # chmem +8192 /usr/bin/ls
    >
    > Check with size how many memory it have before any change.
    >
    > May be that some buffer can not be allocated from stack.
    >
    > Regards,
    > Claudio.



    Claudio,
    Nada - same issue and it stops at the same place. If I cd to /usr/
    X11R6/X11/doc/PostScript and then do ls -l that works and so does "ls -
    R". If I go up one level via cd .. then ls -R will give me the out of
    error message.
    Interesting to say the least.
    Peter


  5. Re: ls -R > test

    On Feb 6, 7:42 pm, "hal1401" wrote:
    > On Feb 6, 3:38 pm, ctantign...@gmail.com wrote:
    >
    >
    >
    >
    >
    > > On Feb 6, 3:21 pm, "hal1401" wrote:

    >
    > > > When I issues this command I get and "out of memory" error message.
    > > > "ls -R > test" should list all directories and pipe them to a file
    > > > called test.

    >
    > > > When I browse the file "test" it stops after it tries to list this
    > > > entry - dtprint_fspec.ps in the library: usr/X11R6/lib/X11/doc/
    > > > PostScript

    >
    > > > This is the equivalent of dir of the "c:" drive in DOS and I don't
    > > > think it should hang on an "out of memory" message.

    >
    > > > Any thoughts?

    >
    > > > Peter

    >
    > > Hello,
    > > try adding more memory to command

    >
    > > # chmem +8192 /usr/bin/ls

    >
    > > Check with size how many memory it have before any change.

    >
    > > May be that some buffer can not be allocated from stack.

    >
    > > Regards,
    > > Claudio.

    >
    > Claudio,
    > Nada - same issue and it stops at the same place. If I cd to /usr/
    > X11R6/X11/doc/PostScript and then do ls -l that works and so does "ls -
    > R". If I go up one level via cd .. then ls -R will give me the out of
    > error message.
    > Interesting to say the least.
    > Peter- Hide quoted text -
    >
    > - Show quoted text -


    Hello, with this comment, I believe that is a buffer into ls, but that
    create
    some issue in the long name.

    I have no X installed in my system, but you can try a simple test.
    Rename
    the PostScript to something short like PS and try again the command.
    If it
    works, may be some error into ls command.

    I suggested to add only 8192 bytes, but you can try with bigger
    numbers, like
    655360 or more. May be also that the buffer that ls needs to allocate
    is really big
    because may be long names and a lot of files.

    Your tests will be usefull for others also.

    Regards,
    Claudio.



  6. Re: ls -R > test

    On Feb 6, 3:36 pm, "Erik van der Kouwe" wrote:
    > > When I issues this command I get and "out of memory" error message.
    > > "ls -R > test" should list all directories and pipe them to a file
    > > called test.

    >
    > > When I browse the file "test" it stops after it tries to list this
    > > entry - dtprint_fspec.ps in the library: usr/X11R6/lib/X11/doc/
    > > PostScript

    >
    > > This is the equivalent of dir of the "c:" drive in DOS and I don't
    > > think it should hang on an "out of memory" message.

    >
    > > Any thoughts?

    >
    > Have you tried chmem? Minix memory management is not really flexible
    > right now, but that should change when virtual memory is implemented.
    >
    > On the other hand, one whould say that an efficient implementation of
    > ls should not need much memory even when listing the entire file
    > system. The source file for ls is found at commands/simple/ls.c in case
    > you want to see if you can implement it more efficiently.


    Erik,
    I have increased the memory as per Claudio's post and it still fails.
    I am not a "C" programmer, PL/1 or Basic.
    I did check the source code and it is 1150 lines long and the only
    time he calls an error is for memory allocation right at the
    beginning. I think what is unique about the this entry is its size
    which is 1,325,649 but then ig gets handle properly when doing ls -l
    or ls -R when one is right in that direrectory.
    I will do some more looking but "C" is not my strong suite.
    Peter


  7. Re: ls -R > test

    On Feb 6, 6:46 pm, ctantign...@gmail.com wrote:
    > On Feb 6, 7:42 pm, "hal1401" wrote:
    >
    >
    >
    > > On Feb 6, 3:38 pm, ctantign...@gmail.com wrote:

    >
    > > > On Feb 6, 3:21 pm, "hal1401" wrote:

    >
    > > > > When I issues this command I get and "out of memory" error message.
    > > > > "ls -R > test" should list all directories and pipe them to a file
    > > > > called test.

    >
    > > > > When I browse the file "test" it stops after it tries to list this
    > > > > entry - dtprint_fspec.ps in the library: usr/X11R6/lib/X11/doc/
    > > > > PostScript

    >
    > > > > This is the equivalent of dir of the "c:" drive in DOS and I don't
    > > > > think it should hang on an "out of memory" message.

    >
    > > > > Any thoughts?

    >
    > > > > Peter

    >
    > > > Hello,
    > > > try adding more memory to command

    >
    > > > # chmem +8192 /usr/bin/ls

    >
    > > > Check with size how many memory it have before any change.

    >
    > > > May be that some buffer can not be allocated from stack.

    >
    > > > Regards,
    > > > Claudio.

    >
    > > Claudio,
    > > Nada - same issue and it stops at the same place. If I cd to /usr/
    > > X11R6/X11/doc/PostScript and then do ls -l that works and so does "ls -
    > > R". If I go up one level via cd .. then ls -R will give me the out of
    > > error message.
    > > Interesting to say the least.
    > > Peter- Hide quoted text -

    >
    > > - Show quoted text -

    >
    > Hello, with this comment, I believe that is a buffer into ls, but that
    > create
    > some issue in the long name.
    >
    > I have no X installed in my system, but you can try a simple test.
    > Rename
    > the PostScript to something short like PS and try again the command.
    > If it
    > works, may be some error into ls command.
    >
    > I suggested to add only 8192 bytes, but you can try with bigger
    > numbers, like
    > 655360 or more. May be also that the buffer that ls needs to allocate
    > is really big
    > because may be long names and a lot of files.
    >
    > Your tests will be usefull for others also.
    >
    > Regards,
    > Claudio.


    Claudio,
    I don't have rename on my system. I don't know why as I have the
    "man" for it. I did a - find / -name "rename" and it did not find
    it. I did a find / -name "whoami" and it found two versions, one on
    the hard drive and the other on the CD.
    My system is a P II - 350MHz system with 327 meg of ram. I don't
    think there is an issue with memory.
    Peter


  8. Re: ls -R > test

    On Feb 6, 6:46 pm, ctantign...@gmail.com wrote:
    > On Feb 6, 7:42 pm, "hal1401" wrote:
    >
    >
    >
    > > On Feb 6, 3:38 pm, ctantign...@gmail.com wrote:

    >
    > > > On Feb 6, 3:21 pm, "hal1401" wrote:

    >
    > > > > When I issues this command I get and "out of memory" error message.
    > > > > "ls -R > test" should list all directories and pipe them to a file
    > > > > called test.

    >
    > > > > When I browse the file "test" it stops after it tries to list this
    > > > > entry - dtprint_fspec.ps in the library: usr/X11R6/lib/X11/doc/
    > > > > PostScript

    >
    > > > > This is the equivalent of dir of the "c:" drive in DOS and I don't
    > > > > think it should hang on an "out of memory" message.

    >
    > > > > Any thoughts?

    >
    > > > > Peter

    >
    > > > Hello,
    > > > try adding more memory to command

    >
    > > > # chmem +8192 /usr/bin/ls

    >
    > > > Check with size how many memory it have before any change.

    >
    > > > May be that some buffer can not be allocated from stack.

    >
    > > > Regards,
    > > > Claudio.

    >
    > > Claudio,
    > > Nada - same issue and it stops at the same place. If I cd to /usr/
    > > X11R6/X11/doc/PostScript and then do ls -l that works and so does "ls -
    > > R". If I go up one level via cd .. then ls -R will give me the out of
    > > error message.
    > > Interesting to say the least.
    > > Peter- Hide quoted text -

    >
    > > - Show quoted text -

    >
    > Hello, with this comment, I believe that is a buffer into ls, but that
    > create
    > some issue in the long name.
    >
    > I have no X installed in my system, but you can try a simple test.
    > Rename
    > the PostScript to something short like PS and try again the command.
    > If it
    > works, may be some error into ls command.
    >
    > I suggested to add only 8192 bytes, but you can try with bigger
    > numbers, like
    > 655360 or more. May be also that the buffer that ls needs to allocate
    > is really big
    > because may be long names and a lot of files.
    >
    > Your tests will be usefull for others also.
    >
    > Regards,
    > Claudio.



    Claudio,
    I moved what I thought was the offending file, dtprint_fspec.ps, to /
    tst. I then re-ran ls -R and we still hang in /usr/X11/lib/X11/doc/
    PostScript. Since I don't have "rename" (why don't I - anyone
    know?), I used mv to move the file to /tst.
    Peter


  9. Re: ls -R > test

    hal1401 wrote:



    > Claudio,
    > I moved what I thought was the offending file, dtprint_fspec.ps, to /
    > tst. I then re-ran ls -R and we still hang in /usr/X11/lib/X11/doc/
    > PostScript. Since I don't have "rename" (why don't I - anyone
    > know?), I used mv to move the file to /tst.


    "rename" is not a standard command, but a tool that can rename large
    amounts of files using patterns. It is probably not yet ported to Minix,
    that's why you can't find it. "mv" _is_ the proper command for renaming
    files.

    Jens

    --
    Jens de Smit
    Student Computer Science | Vrije Universiteit Amsterdam
    jfdsmit@few.vu.nl | http://www.few.vu.nl/~jfdsmit

  10. Re: ls -R > test

    All,

    Be sure you're chmemming the right ls; there is an ls in /bin too, which
    is probably earlier in the $PATH.

    =Ben



  11. Re: ls -R > test

    On Feb 7, 9:45 am, Ben Gras wrote:
    >
    > Be sure you're chmemming the right ls; there is an ls in /bin too, which
    > is probably earlier in the $PATH.


    It can't be memory as it fails even when listing only a small part of
    the file system and always in the same place. There must be something
    else like bad disk blocks, circular links, or incorrectly-written
    inodes, but I wouldn't know what.


  12. Re: ls -R > test

    On Feb 7, 9:08 am, Smit de JF wrote:
    > hal1401 wrote:
    >
    >
    >
    > > Claudio,
    > > I moved what I thought was the offending file, dtprint_fspec.ps, to /
    > > tst. I then re-ran ls -R and we still hang in /usr/X11/lib/X11/doc/
    > > PostScript. Since I don't have "rename" (why don't I - anyone
    > > know?), I used mv to move the file to /tst.

    >
    > "rename" is not a standard command, but a tool that can rename large
    > amounts of files using patterns. It is probably not yet ported to Minix,
    > that's why you can't find it. "mv" _is_ the proper command for renaming
    > files.
    >
    > Jens
    >
    > --
    > Jens de Smit
    > Student Computer Science | Vrije Universiteit Amsterdam
    > jfds...@few.vu.nl |http://www.few.vu.nl/~jfdsmit



    Jens,
    I moved /usr/X11R6/lib/X11/doc to / and there was not enough space. I
    then moved /usr/X11R6/lib/X11/doc to /home.
    Then I tried to rm the contents of /usr/X11R6/lib/X11/doc on " /".
    PostScript is a directory in /usr/X11R6/lib/X11/doc and I tried to
    rmdir PostScript. That did not work as PostScript has another
    direcrory in it. I then tried and ls -l PostScript on and got error
    messages that there was not enough space on / and also got the out of
    memeory error message.

    My guess is that the error messages are tied up with not enough spece
    on /.

    I then moved whatever stuff was left on / to /home and ls -l works
    again as / has now some room. I then tried ls -R > test and I got the
    out of memory message again. By the way ls -R also gets the error
    message.

    Interesting!

    As I now screwd up the original /usr/X11............. directory
    with the mv comands. Don't ask!
    I am going to re-install on my 4 gig hard drive but how do I give /
    and /root more space?

    I live in Canada and it is now 11:16 my time. GMT is + 6 hours. I
    need to do something for the rest of the day and won't be back until
    GMT 03:00 or later.

    Peter

    Peter


  13. Re: ls -R > test

    On Feb 7, 1:17 pm, "hal1401" wrote:
    > On Feb 7, 9:08 am, Smit de JF wrote:
    >
    >
    >
    >
    >
    > > hal1401 wrote:

    >
    > >

    >
    > > > Claudio,
    > > > I moved what I thought was the offending file, dtprint_fspec.ps, to /
    > > > tst. I then re-ran ls -R and we still hang in /usr/X11/lib/X11/doc/
    > > > PostScript. Since I don't have "rename" (why don't I - anyone
    > > > know?), I used mv to move the file to /tst.

    >
    > > "rename" is not a standard command, but a tool that can rename large
    > > amounts of files using patterns. It is probably not yet ported to Minix,
    > > that's why you can't find it. "mv" _is_ the proper command for renaming
    > > files.

    >
    > > Jens

    >
    > > --
    > > Jens de Smit
    > > Student Computer Science | Vrije Universiteit Amsterdam
    > > jfds...@few.vu.nl |http://www.few.vu.nl/~jfdsmit

    >
    > Jens,
    > I moved /usr/X11R6/lib/X11/doc to / and there was not enough space. I
    > then moved /usr/X11R6/lib/X11/doc to /home.
    > Then I tried to rm the contents of /usr/X11R6/lib/X11/doc on " /".
    > PostScript is a directory in /usr/X11R6/lib/X11/doc and I tried to
    > rmdir PostScript. That did not work as PostScript has another
    > direcrory in it. I then tried and ls -l PostScript on and got error
    > messages that there was not enough space on / and also got the out of
    > memeory error message.
    >
    > My guess is that the error messages are tied up with not enough spece
    > on /.
    >
    > I then moved whatever stuff was left on / to /home and ls -l works
    > again as / has now some room. I then tried ls -R > test and I got the
    > out of memory message again. By the way ls -R also gets the error
    > message.
    >
    > Interesting!
    >
    > As I now screwd up the original /usr/X11............. directory
    > with the mv comands. Don't ask!
    > I am going to re-install on my 4 gig hard drive but how do I give /
    > and /root more space?
    >
    > I live in Canada and it is now 11:16 my time. GMT is + 6 hours. I
    > need to do something for the rest of the day and won't be back until
    > GMT 03:00 or later.
    >
    > Peter
    >
    > Peter- Hide quoted text -
    >
    > - Show quoted text -


    Hello,
    I tested a default 3.1.2a installation and it shows the problem you
    mention when
    you run ls -R

    Ben comment is right, the default PATH points to /bin/ls and you are
    changing memory configuration for /usr/bin/ls.

    a simple test is to rename /bin/ls using the mv command.

    # mv /bin/ls /bin/lls

    and chmem the /usr/bin/ls command like

    # chmem +131072 /usr/bin/ls

    with this change the ls -R command works fine.

    The first time I found the error is in the /usr/X11R6/lib/X11/doc/html
    where you have
    a lot of files, the ls commands needs more stack or buffer and have no
    memory.

    Other directory where you can have the same error is in /usr/X11R6/lib/
    X11/fonts with
    100dpi and 75dpi where there are several files.

    After changing the memory configuration, it works fine. Check the PATH
    variable.

    Regards,
    Claudio.




  14. Re: ls -R > test

    On Feb 7, 7:25 pm, ctantign...@gmail.com wrote:
    > On Feb 7, 1:17 pm, "hal1401" wrote:
    >
    >
    >
    > > On Feb 7, 9:08 am, Smit de JF wrote:

    >
    > > > hal1401 wrote:

    >
    > > >

    >
    > > > > Claudio,
    > > > > I moved what I thought was the offending file, dtprint_fspec.ps, to /
    > > > > tst. I then re-ran ls -R and we still hang in /usr/X11/lib/X11/doc/
    > > > > PostScript. Since I don't have "rename" (why don't I - anyone
    > > > > know?), I used mv to move the file to /tst.

    >
    > > > "rename" is not a standard command, but a tool that can rename large
    > > > amounts of files using patterns. It is probably not yet ported to Minix,
    > > > that's why you can't find it. "mv" _is_ the proper command for renaming
    > > > files.

    >
    > > > Jens

    >
    > > > --
    > > > Jens de Smit
    > > > Student Computer Science | Vrije Universiteit Amsterdam
    > > > jfds...@few.vu.nl |http://www.few.vu.nl/~jfdsmit

    >
    > > Jens,
    > > I moved /usr/X11R6/lib/X11/doc to / and there was not enough space. I
    > > then moved /usr/X11R6/lib/X11/doc to /home.
    > > Then I tried to rm the contents of /usr/X11R6/lib/X11/doc on " /".
    > > PostScript is a directory in /usr/X11R6/lib/X11/doc and I tried to
    > > rmdir PostScript. That did not work as PostScript has another
    > > direcrory in it. I then tried and ls -l PostScript on and got error
    > > messages that there was not enough space on / and also got the out of
    > > memeory error message.

    >
    > > My guess is that the error messages are tied up with not enough spece
    > > on /.

    >
    > > I then moved whatever stuff was left on / to /home and ls -l works
    > > again as / has now some room. I then tried ls -R > test and I got the
    > > out of memory message again. By the way ls -R also gets the error
    > > message.

    >
    > > Interesting!

    >
    > > As I now screwd up the original /usr/X11............. directory
    > > with the mv comands. Don't ask!
    > > I am going to re-install on my 4 gig hard drive but how do I give /
    > > and /root more space?

    >
    > > I live in Canada and it is now 11:16 my time. GMT is + 6 hours. I
    > > need to do something for the rest of the day and won't be back until
    > > GMT 03:00 or later.

    >
    > > Peter

    >
    > > Peter- Hide quoted text -

    >
    > > - Show quoted text -

    >
    > Hello,
    > I tested a default 3.1.2a installation and it shows the problem you
    > mention when
    > you run ls -R
    >
    > Ben comment is right, the default PATH points to /bin/ls and you are
    > changing memory configuration for /usr/bin/ls.
    >
    > a simple test is to rename /bin/ls using the mv command.
    >
    > # mv /bin/ls /bin/lls
    >
    > and chmem the /usr/bin/ls command like
    >
    > # chmem +131072 /usr/bin/ls
    >
    > with this change the ls -R command works fine.
    >
    > The first time I found the error is in the /usr/X11R6/lib/X11/doc/html
    > where you have
    > a lot of files, the ls commands needs more stack or buffer and have no
    > memory.
    >
    > Other directory where you can have the same error is in /usr/X11R6/lib/
    > X11/fonts with
    > 100dpi and 75dpi where there are several files.
    >
    > After changing the memory configuration, it works fine. Check the PATH
    > variable.
    >
    > Regards,
    > Claudio.



    Claudio,
    I did a full install on my system. When my machine boots it shows
    393,216K for memory.

    $PATH is /root/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin

    After the install and before I installed X11 libraries both /bin/ls -
    R and /usr/bin/ls -R worked.
    I then installed X11 libraries and sure enough both ls binaries
    stopped with the out of memory messages.

    I renamed /bin/ls to /bin/lsx via the mv command.

    I then increased the memory for /usr/bin/ls via the chmen command
    except I did it in installment, one +8192 at a time. When I got to
    Stack + malloc area changed from 147456 to 1556448 it worked.
    My base system seems to have 81920 for Stack + Malloc.
    What happens if a system only has 128,000K or less?
    Peter


  15. Re: ls -R > test

    On Feb 8, 12:44 pm, "hal1401" wrote:
    >
    > Claudio,
    > I did a full install on my system. When my machine boots it shows
    > 393,216K for memory.
    >
    > $PATH is /root/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
    >
    > After the install and before I installed X11 libraries both /bin/ls -
    > R and /usr/bin/ls -R worked.
    > I then installed X11 libraries and sure enough both ls binaries
    > stopped with the out of memory messages.
    >
    > I renamed /bin/ls to /bin/lsx via the mv command.
    >
    > I then increased the memory for /usr/bin/ls via the chmen command
    > except I did it in installment, one +8192 at a time. When I got to
    > Stack + malloc area changed from 147456 to 1556448 it worked.
    > My base system seems to have 81920 for Stack + Malloc.
    > What happens if a system only has 128,000K or less?
    > Peter- Hide quoted text -
    >
    > - Show quoted text -


    Hello, perhaps it is too long for me to explain this issues with
    memory.
    The basic idea is that as minix uses assigned memory, if it have no
    more
    memory for a buffer, it have the error you discovered. If you assign a
    lot of memory
    to a program (i.e. via chmem) and your code does not use it, you waste
    memory.
    For this reason the compiler assigns some standard memory (I believe
    128K default)
    but you can add or reduce it using chmem.

    About your question, your machine have 393216K or 393MBytes of RAM.
    128000K is 128M
    and you assign to the original program until you have 155K or 0.155MB
    so your machine
    can have less memory. The only problem is how many programs you can
    run in it, the answer
    is until you fill all memory and minix can not allocate some space to
    run your new program.
    Using swapping, Minix can move some program that is not in use,
    allocate all memory for
    the new program and run it. The problem here is the time with programs
    going to and from disk
    that it is very slower than RAM.

    I suggest to read the minix3.org site and all the FAQs you can about
    it, also the Operating Systems
    book. Really it is an interesting topic, but too big to write it in a
    news.

    Regards,
    Claudio.


  16. Re: ls -R > test

    On Feb 8, 7:12 pm, ctantign...@gmail.com wrote:
    > On Feb 8, 12:44 pm, "hal1401" wrote:
    >
    >
    >
    >
    >
    > > Claudio,
    > > I did a full install on my system. When my machine boots it shows
    > > 393,216K for memory.

    >
    > > $PATH is /root/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin

    >
    > > After the install and before I installed X11 libraries both /bin/ls -
    > > R and /usr/bin/ls -R worked.
    > > I then installed X11 libraries and sure enough both ls binaries
    > > stopped with the out of memory messages.

    >
    > > I renamed /bin/ls to /bin/lsx via the mv command.

    >
    > > I then increased the memory for /usr/bin/ls via the chmen command
    > > except I did it in installment, one +8192 at a time. When I got to
    > > Stack + malloc area changed from 147456 to 1556448 it worked.
    > > My base system seems to have 81920 for Stack + Malloc.
    > > What happens if a system only has 128,000K or less?
    > > Peter- Hide quoted text -

    >
    > > - Show quoted text -

    >
    > Hello, perhaps it is too long for me to explain this issues with
    > memory.
    > The basic idea is that as minix uses assigned memory, if it have no
    > more
    > memory for a buffer, it have the error you discovered. If you assign a
    > lot of memory
    > to a program (i.e. via chmem) and your code does not use it, you waste
    > memory.
    > For this reason the compiler assigns some standard memory (I believe
    > 128K default)
    > but you can add or reduce it using chmem.
    >
    > About your question, your machine have 393216K or 393MBytes of RAM.
    > 128000K is 128M
    > and you assign to the original program until you have 155K or 0.155MB
    > so your machine
    > can have less memory. The only problem is how many programs you can
    > run in it, the answer
    > is until you fill all memory and minix can not allocate some space to
    > run your new program.
    > Using swapping, Minix can move some program that is not in use,
    > allocate all memory for
    > the new program and run it. The problem here is the time with programs
    > going to and from disk
    > that it is very slower than RAM.
    >
    > I suggest to read the minix3.org site and all the FAQs you can about
    > it, also the Operating Systems
    > book. Really it is an interesting topic, but too big to write it in a
    > news.
    >
    > Regards,
    > Claudio.



    Claudio,
    Thanks for the feedback! I understand about the memory. I used to
    program in PL/1 not "C" or "shell".
    I am reading "man boot" and am trying to figure out networking and
    there will be questions. I did read FAQ but then one can read and
    not necessarily understand.
    Thanks again,
    Peter


  17. Re: ls -R > test


    "hal1401" writes:


    > Claudio,
    > I did a full install on my system. When my machine boots it shows
    > 393,216K for memory.
    >
    > $PATH is /root/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
    >
    > After the install and before I installed X11 libraries both /bin/ls -
    > R and /usr/bin/ls -R worked.
    > I then installed X11 libraries and sure enough both ls binaries
    > stopped with the out of memory messages.
    >
    > I renamed /bin/ls to /bin/lsx via the mv command.
    >
    > I then increased the memory for /usr/bin/ls via the chmen command
    > except I did it in installment, one +8192 at a time. When I got to
    > Stack + malloc area changed from 147456 to 1556448 it worked.
    > My base system seems to have 81920 for Stack + Malloc.
    > What happens if a system only has 128,000K or less?
    > Peter


    chmem units are bytes.

    Regards -- Markus



+ Reply to Thread