Register the OOM simulator. This must occur before any memory ** allocations */
| 527 | /* Register the OOM simulator. This must occur before any memory |
| 528 | ** allocations */ |
| 529 | static void registerOomSimulator(void){ |
| 530 | sqlite3_mem_methods mem; |
| 531 | sqlite3_config(SQLITE_CONFIG_GETMALLOC, &mem); |
| 532 | defaultMalloc = mem.xMalloc; |
| 533 | mem.xMalloc = oomMalloc; |
| 534 | sqlite3_config(SQLITE_CONFIG_MALLOC, &mem); |
| 535 | } |
| 536 | #endif |
| 537 | |
| 538 | /* |