473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

too much memory use

hi ,
i am making a program for desktop search.
in order to make it more effective im implementing the records in the
form of a tree(files starting with 'a','b','c'....have different
trees ..so 26 trees in all) in memory and writing it down in file.
the max size file has 16000 records...now to implement the tree in
list i'm using line no as index ..and empty child nodes are
represented as "\n"
all this work is going on in the memory..
problem is the system eats up my 512 mb RAM +1gb virtual store n hangs
cant think of an effective way to implement tree in memory(i can
compact it on disk by writing just the index no..along with the record
from which tree in memory can be reconstructed, but i have to
implement tree as previous to implement random access)
please help..
rohit sethi
delhi college of engineering

May 22 '07 #1
2 1599
In <11**********************@a26g2000pre.googlegroups .com>, rohit wrote:
i am making a program for desktop search.
in order to make it more effective im implementing the records in the
form of a tree(files starting with 'a','b','c'....have different
trees ..so 26 trees in all) in memory and writing it down in file.
the max size file has 16000 records...now to implement the tree in
list i'm using line no as index ..and empty child nodes are
represented as "\n"
all this work is going on in the memory..
problem is the system eats up my 512 mb RAM +1gb virtual store n hangs
cant think of an effective way to implement tree in memory(i can
compact it on disk by writing just the index no..along with the record
from which tree in memory can be reconstructed, but i have to
implement tree as previous to implement random access)
I'm not quite sure what exactly you have as in-memory data structures and
how many "records" -- are you sure you don't keep references to objects
you don't really need anymore? Or maybe you have object cycles and
implemented the `__del__()` method on those objects?

Anyway… If the data doesn't fit into memory anymore it's time to put
them into a database. Either a `shelve`, an SQL database like SQLite or
maybe an object database like zodb or Durus.

Ciao,
Marc 'BlackJack' Rintsch
May 22 '07 #2
rohit <ro***********@gmail.comwrote:
>
i am making a program for desktop search.
in order to make it more effective im implementing the records in the
form of a tree(files starting with 'a','b','c'....have different
trees ..so 26 trees in all) in memory and writing it down in file.
the max size file has 16000 records...now to implement the tree in
list i'm using line no as index ..and empty child nodes are
represented as "\n"
all this work is going on in the memory..
problem is the system eats up my 512 mb RAM +1gb virtual store n hangs
cant think of an effective way to implement tree in memory(i can
compact it on disk by writing just the index no..along with the record
from which tree in memory can be reconstructed, but i have to
implement tree as previous to implement random access)
Why don't you just use a database? That's what they're designed for.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
May 24 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andreas Suurkuusk | last post by:
Hi, I just noticed your post in the "C# memory problem: no end for our problem?" thread. In the post you implied that I do not how the garbage collector works and that I mislead people. Since...
4
by: Frank Esser | last post by:
I am using SQL 8 Personal edition with sp2 applied. I set the max server memory to 32MB and leave the min server memory at 0. When my application starts hitting the database hard the memory usage...
4
by: Franklin Lee | last post by:
Hi All, I use new to allocate some memory,even I doesn't use delete to release them. When my Application exit, OS will release them. Am I right? If I'm right, how about Thread especally on...
9
by: Mike P | last post by:
I know everything about reference counting and making sure you don't have large objects lying around. I have also profiled my app with multiple tools. I know about the fact GC collects memory but...
22
by: xixi | last post by:
hi, we are using db2 udb v8.1 for windows, i have changed the buffer pool size to accommadate better performance, say size 200000, if i have multiple connection to the same database from...
14
by: Alessandro Monopoli | last post by:
Hi all, I'm searching a PORTABLE way to get the available and total physical memory. Something like "getTotalMemory" and it returns the memory installed on my PC in bytes, and...
1
by: Nick Craig-Wood | last post by:
I've been dumping a database in a python code format (for use with Python on S60 mobile phone actually) and I've noticed that it uses absolutely tons of memory as compared to how much the data...
5
by: kumarmdb2 | last post by:
Hi guys, For last few days we are getting out of private memory error. We have a development environment. We tried to figure out the problem but we believe that it might be related to the OS...
1
by: Jean-Paul Calderone | last post by:
On Tue, 22 Apr 2008 14:54:37 -0700 (PDT), yzghan@gmail.com wrote: The test doesn't demonstrate any leaks. It does demonstrate that memory usage can remain at or near peak memory usage even after...
5
by: cham | last post by:
Hi, I am working on c++ in a linux system ( Fedora core 4 ), kernel version - 2.6.11-1.1369_FC4 gcc version - 4.0.0 20050519 ( Red Hat 4.0.0-8 ) In my code i am creating a vector to store...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.