| OCR Text |
Show 36 t he object 1 . One ce ntra l data structure t hat is used to keep track of a ll p ers istent obj ects Js tlw "oicLtable." It keeps the OID Lo virtual address mapping, fl ags which tell whether an object has been lo a.d<'d j c!JJIT1p ed or not , etc. Loading a.ncl saving of objects is driven by t hi s ta ble aucl so, loading and sav ing do not have to be clone by doi ug a pre-o rder object graph traversal as befo re . 4.2 Saving & Loading Objects with OIDs The machine informat ion and the object descriptors are wri tten out as b efo re . Tlw roo t obj ect of t he object g raph is ass igned tbe OID I and put in t he oicL tabl e, 1\l a.rkecl as not dumped. The o icLt able is searched for objects wh ich ba.ve no t yet been dum ped (see Algoritb rn :3) and one of t hem is ranclornly p icked. All pointers in th is object to oth e r objects are swizz led . 'To achieve this, slots of type"*", "@", ·'> ", "n()" (pointer to next e l e m<-~ n t in a li st), "p()" (pointer to previous element in a li st) are considered. If the object corresponding to t hi s pointer bas an OlD t hen its OlD is obtained from the oicUable otherwise a. new OID is generated by inc r e tm~ uting a per- fil e counter an d the OID is entered in the oi cLtabl e . The pointer is replaced by the OlD of the target object . The buil t- in data and character strings t.l1at a re pointed to by this object a re copied-in in the byte stream corresponding to thi s obj ect . ' ['be obj ect's OID is written out , followed by t he actual object. The new load a lgorithm (see Algorithm 4 ) handl es tbc machine inform ation and t he object descriptors as before . The rnaiu diff'erence is iu t he way the various !Jl li JJt.c rs ( '·'"' " , "(Ql" , ">", "n()" and "p()") are ha ndled. Because of pointer swizz Lin g, all such pointe r slots co ntain the OID of the object that they refe r to. If tbt· ohject with this OlD has already been loaded t hen the OID is replaced by the ad dress of t he target obj ect ot he rwise th e address of t he pointer slot is en te red in 1 Fo r backward cornpat.ib ili t.y, t he ori ginal flag by tes and interpretation code has been left intact. |