Changeset 6654 for trunk/ARBDB/ad_load.cxx
- Timestamp:
- 13/05/10 17:30:03 (2 years ago)
- Files:
-
- 1 modified
-
trunk/ARBDB/ad_load.cxx (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ARBDB/ad_load.cxx
r6649 r6654 945 945 case GB_INTS: 946 946 case GB_FLOATS: 947 size = gb_read_number(in); 948 memsize = gb_read_number(in); 947 size = gb_read_number(in); 948 memsize = gb_read_number(in); 949 949 950 DEBUG_DUMP_INDENTED(deep, GBS_global_string("size=%li memsize=%li", size, memsize)); 950 951 if (GB_CHECKINTERN(size, memsize)) { … … 954 955 else { 955 956 GB_SETEXTERN(gb2); 956 p = gbm_get_mem((size_t)memsize+1, GB_GBM_INDEX(gb2)); // ralf: added +1 because decompress ran out of this block 957 // memsize++; // ralf: added +1 because decompress ran out of this block (cant solve like this - breaks memory management!) 958 p = gbm_get_mem((size_t)memsize, GB_GBM_INDEX(gb2)); 957 959 } 958 960 i = fread(p, 1, (size_t)memsize, in); … … 1200 1202 1201 1203 gb_main_array[new_idx] = Main; 1204 1205 gbm_free_mem((char*)Main->data, sizeof(GBCONTAINER), GB_QUARK_2_GBMINDEX(Main, 0)); 1206 1202 1207 Main->data = newGbd; 1203 1208 father->main_idx = new_idx; … … 1378 1383 bool dbCreated = false; 1379 1384 1380 GBK_install_SIGSEGV_handler(true);1381 1382 1385 if (!opent) opentype = gb_open_all; 1383 1386 else if (strchr(opent, 'w')) opentype = gb_open_all; … … 1451 1454 } 1452 1455 1453 gbm_init_mem(); 1456 if (GB_install_pid(1)) return 0; 1457 1454 1458 GB_init_gb(); 1455 1456 if (GB_install_pid(1)) return 0;1457 1459 1458 1460 Main = gb_make_gb_main_type(path);
