Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #55100
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: A brief note regarding BUFFER: |
| Date | 2017-02-25 17:40 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2017Feb25.184011@mips.complang.tuwien.ac.at> (permalink) |
| References | <df459f73-51d4-4b00-9215-f6c0071bac99@googlegroups.com> |
Julian Fondren <julian.fondren@gmail.com> writes:
>Hello clf,
>
>Suppose you have hard limits and some mild configuration at compile
>time, with code like
>
> [undefined] max-users [if]
> 100 constant max-users
> [then]
>
> create user-table max-users user-size * allot
> create enemies max-users cells allot
> ... and so on ...
>
>Not all software is permitted to use all available resources and then
>kill its host when under duress, and for such software it's nice to be
>able to say that when tuned a certain way it'll use at most some
>amount of memory.
>
>
>Now let's suppose someone says "I'd like to see how this code works
>with 100 million users". You would likely have to rewrite the above:
>
> max-users user-size * allocate throw constant user-table
> max-users cells allocate throw constant enemies
Or you can keep the code and call the system with
gforth -m 4G ...
(assuming that 4GB of dictionary is enough); and you can use
--vm-commit (and configure the OS to avoid overcommitting memory) to
let the process die right away instead of only under duress.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2016: http://www.euroforth.org/ef16/
Back to comp.lang.forth | Previous | Next — Previous in thread | Find similar | Unroll thread
A brief note regarding BUFFER: Julian Fondren <julian.fondren@gmail.com> - 2017-02-24 22:59 -0800 Re: A brief note regarding BUFFER: "Elizabeth D. Rather" <erather@forth.com> - 2017-02-24 21:31 -1000 Re: A brief note regarding BUFFER: anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-02-25 17:40 +0000
csiph-web