dbTalk Databases Forums  

ENOMEM error in BerklyDb

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss ENOMEM error in BerklyDb in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
pai
 
Posts: n/a

Default ENOMEM error in BerklyDb - 11-14-2006 , 10:08 PM






Hi,

While testing berkly in REX os I found following problem,

Test Code:

// Adding 1000 records
unsigned int maxRec = 1000;
unsigned int Key = 0;
unsigned int cnt= 0 ;
char data[200] = "testap1";
int errCode = 0;
DBT stKey;
DBT stData;
// Db is created and opened sucessfully,
*pDb


while( (Key < maxRec ) && (errCode == 0) )
{
memset(&stKey, 0, sizeof(DBT) );
memset(&stData, 0, sizeof(DBT) );
stKey.data = Key ;
stKey.size = sizeof(Key);
stData.data = data;
stData.size = sizeof(data);
errCode = pDb->pPrimaryDB->put( pDb,
NULL, &stKey, &stData, DB_NOOVERWRITE );

Key++;

}

Output:
First 146 record will be added successfully and which adding 147th
record the error code will become ENOMEM


I think to find out above problem I need to analyze the code of
BerklyDb. Is there any documentations(not the interface document ) for
the berklyDb code which explais it architecture and design


Reply With Quote
  #2  
Old   
Philip Guenther
 
Posts: n/a

Default Re: ENOMEM error in BerklyDb - 11-15-2006 , 06:10 PM






On Nov 14, 9:08 pm, "pai" <paimail... (AT) gmail (DOT) com> wrote:
....
Quote:
First 146 record will be added successfully and which adding 147th
record the error code will become ENOMEM
You should use DBENV->set_errfile() or DB->set_errfile() to configure
BDB to write additional error information to stderr. That should show
which internal operation is actually failing.


Quote:
I think to find out above problem I need to analyze the code of
BerklyDb. Is there any documentations(not the interface document ) for
the berklyDb code which explais it architecture and design
The Reference Guide included in the source tree under the 'docs'
subdirectory should be your starting point, as it contains a section on
Berkeley DB architecture. It also includes a page which lists
additional references on Berkeley DB itself, background for particular
DB features, and general database concepts.


Philip Guenther



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.