void objstrDelete(objstr_t *store);
objstr_t *objstrCreate(unsigned int size);
void transStart();
+#ifdef STMARRAY
+objheader_t *transCreateObj(void * ptr, unsigned int size, int bytelength);
+#else
objheader_t *transCreateObj(void * ptr, unsigned int size);
+#endif
unsigned int getNewOID(void);
void *objstrAlloc(unsigned int size);
__attribute__((pure)) void *transRead(void *, void *);
int elementsize=classsize[type];
int length=ao->___length___;
#ifdef STM
+#ifdef STAMARRAY
+ int versionspace=sizeof(int)*(length>>DBLINDEXSHIFT);
+ int size=sizeof(struct ArrayObject)+length*elementsize+sizeof(objheader_t)+versionspace;
+ void *newobj=tomalloc(size);
+ memcpy(newobj, ((char*)orig)-sizeof(objheader_t)-versionspace, size);
+ newobj=((char *)newobj)+sizeof(objheader_t)+versionspace;
+#else
int size=sizeof(struct ArrayObject)+length*elementsize+sizeof(objheader_t);
void *newobj=tomalloc(size);
memcpy(newobj, ((char*)orig)-sizeof(objheader_t), size);
newobj=((char *)newobj)+sizeof(objheader_t);
+#endif
#else
int size=sizeof(struct ArrayObject)+length*elementsize;
void *newobj=tomalloc(size);
/* Object allocation function */
__attribute__((malloc)) void * allocate_newtrans(void * ptr, int type) {
+#ifdef STMARRAY
+ struct ___Object___ * v=(struct ___Object___ *) transCreateObj(ptr, classsize[type], 0);
+#else
struct ___Object___ * v=(struct ___Object___ *) transCreateObj(ptr, classsize[type]);
+#endif
v->type=type;
v->___objlocation___=v;
return v;