[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::c_plus_plus

Title:C++
Notice:Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS)
Moderator:DECCXX::AMARTIN
Created:Fri Nov 06 1987
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3604
Total number of notes:18242

3417.0. "allocating storage for variables?" by PADC::KOLLING (Karen) Thu Jan 30 1997 21:34

    I need to do something totally gross as part of implementing
    a checkpoint facility for a chip model written in C++.  Because
    we have tons and tons of data (think, arrays representing
    memory), we'd like to isolate our data in one place, feed it to
    a compress routine and write it out, then read it directly back in
    for the restore command.  Of course, there would be version
    checking to catch recompilations between the checkpoint and
    restores.  That is, we'll do a raw dump, with no knowledge of
    variable names, etc.  When you relax your grip on the Dramamine,
    could someone point me at any info about how C++ determines where
    to allocate storage for variables, so I can figure out how to
    identify the variable storage and only the variable storage,
    and how I need to monkey around with the few variables we don't want to
    save?  Thanks.
    
T.RTitleUserPersonal
Name
DateLines
3417.1PADC::KOLLINGKarenThu Jan 30 1997 21:414
    p.s.  I need to implement this on both (Alpha) UNIX and (Alpha) VMS,
    so it matters if the allocation strategy differs on those systems,
    although I don't see why it would...
    
3417.2PADC::KOLLINGKarenThu Jan 30 1997 22:208
    It's been pointed out to me offline that I should be clearer
    about the type of data -- some of this is old-fashioned stuff
    like: unsigned int foo[3333333] and some of it is public
    data in instances of classes.  However, we don't "really"
    allocate and deallocate instances on the fly;  everything
    is allocated one time only via h file stuff at startup, and
    never deleted.          
    
3417.3DECCXL::OUELLETTEThu Jan 30 1997 22:225
Both DECSIM and gnuemacs do this sort of thing.
Try the HACKERS or DECSIM conferences.
Try reading the gnuemacs sources around "unexec".

R.