GMP and Win32 Memory Management

Jim White mathimagics at yahoo.co.uk
Mon Dec 4 21:08:50 CET 2006


--- Emmanuel Thomé <Emmanuel.Thome at normalesup.org>
wrote:

> FYI, the mmap() call also is standard to all unices,
> and provides what you describe (to my understanding
> at least).

Thanks, another little hole in my Unix knowledge is
revealed!  This makes sense, in hindsight, since my
experience suggests that the list of design features 
in the NT architecture that might be regarded as novel
is very, very small - so I have always wondered a bit
how on Earth they managed that particular one! They
lifted it, of course ....   :-)


> Really, if you want checkpointing and resuming,
> that's your application's job, not the library's.

And it is an application-level, and
application-specific, control system that I am
thinking about.

Most of the work done in these applications is in
floating-point.  Moreover, where integers are heavily
used, they are precision-bounded, which means they are
stored as mpf's anyway.

These apps are typically given a precision setting at
startup time, then declare tables (arrays) of mpf's of
varying sizes (the tables, that is).  

So they have a common feature, which is that they can
determine their exact memory requirements when they
initialise, and are working with "allocate-once" data
items.

The idea of implementing the allocator service as a
set of custom allocation function was, I confess,
purely speculative.

It did seem a good idea while ever I assumed that the
allocator function would be able to filter the
requests, selecting which ones to handle directly, and
which ones to delegate to the default runtime
functions.

But, as this happy scenario is in fact orthogonal to
reality, I will stick to the simpler approach!

It's really a fast startup when a large dataset is
involved that I want, not necessarily a
checkpoint/restart facility  - although I did imagine 
that using a named filed object, rather than the
paging disk, assuming it made no appreciable
difference in performance, would at the very least
allow me to inspect each application's tables between
runs.


Anyway, if I come up with any useful results I shall
report accordingly ....

Cheers


Send instant messages to your online friends http://uk.messenger.yahoo.com 


More information about the gmp-discuss mailing list