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

Conference star::wizards

Title: "ASK THE WIZARDS"
Moderator:QUARK::LIONEL
Created:Mon Oct 30 1995
Last Modified:Mon May 12 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1857
Total number of notes:3728

1435.0. "Open: what is lib$free_vm trying to accomplish?" by STAR::JKEENAN () Thu Jan 16 1997 09:13

T.RTitleUserPersonal
Name
DateLines
1435.1Probably A Memory Pool Corruption...XDELTA::HOFFMANSteve, OpenVMS EngineeringMon Feb 03 1997 15:5417
   What version of C are you using?  DEC C, or the older VAX C?  What
   version?  (OpenVMS VAX V7.1 and DEC C V5.5 are the current product
   releases.)

   In my experience, this sort of problem almost always points to a
   user data corruption -- probably an overrun of some sort.  (I've
   encountered and even created a few of these myself over the years.)

   I'd strongly recommend instrumenting your malloc and free code by
   placing a "wrapper" around the malloc and free calls -- placing a
   quadword "fencepost" at the front and the back of the memory that
   is actually allocated, loading it with a known value at allocate
   and checking the value at deallocate, and returning the allocated
   memory -- less the two quadwords -- to the caller of the "wrapper"
   routine.  These wrappers and fenceposts can be invaluable at catching
   memory stompers of all manner.