-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nemanja Čorlija wrote: > My problem is that I am running out of memory when trying to load > 1.6GB sqlite3 db from disk to :memmory: db on a computer with 4GB of > RAM.
Your RAM isn't the problem. You are running out of address space. For a 32 bit process, the address space available is 4GB. The operating system typically reserves 1 or 2GB of that for its own uses (eg Linux typically reserves 1GB, Windows reserves 2GB, I don't know what OSX does). That means that all the shared libraries, your stack, each stack's thread if the process is multithreaded, memory mapped files as well as dynamically allocated memory all have to fit within that remaining space. In your case you ran out :-) Here is an example of how to look at what is in a process' address space: http://blog.mozilla.com/dolske/2007/10/16/os-x-and-virtual-bloat/ If you must take this :memory: approach then you will have to switch to using a 64 bit process which will also require a 64 bit kernel and processor. (Note that the amount of physical RAM only affects performance). However wanting the entire database in memory implies you are having performance issues. What were those? The archives of this list contain many performance questions and solutions. The wiki also contains some, although nothing specific to OSX. This is an example for Windows: http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuningWindows Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHjzVKmOOfHg372QQRAol6AJ4vs+SzvMqWr3Dp6oe+C62zshAV3wCgvVAA 4sPfraHPcTH3/BSbL17kkaw= =/M2H -----END PGP SIGNATURE----- ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------