Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 25th, 2004, 03:29 AM
singhjoga singhjoga is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 20 singhjoga User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 13 m 31 sec
Reputation Power: 0
Root cause of all my problems (fbudf+libfbclient)

Guys, if you remeber me, I have been flooding all the user groups
related to firebird, with my problem related to firebird using huge
amount of memory. Now finally I have found the root cause of my
problem.

It is the udf library 'fbudf', which comes with the firebird
distribution. BUT there is nothing wrong with the code as such. I
discovered that when any udf library is linked with 'libfbclient',
memory is not properly freed up. But then there are some functions in
fbudf, which require libfbclient (i.e. call to isc_decode_timestamp,
isc_encode_timestamp etc.). So if you don't link fbudf with
libfbclient, those functions (addYear) don't respond. Here is what I
did for fbudf:

1. Copied the source code related to isc_decode_timestamp,
isc_encode_timestamp and related functions into a new C file.

2. Removed the linking of libfbclient.

3. Linked the new C file with 'fbudf'.

AND guess what? It is running since saturday without a single byte
increase. Moreover I was amazed to see the low footprint of firebird.
It is using only 3MB.

The above behaviour can be easily reproduced by linking any udf
library with libfbclient (even if you don't make any call to the
libfbclient). Then see the difference in memory usage, after making
good number of calls to any function in that udf library.

Guys thanks a lot for your help.

Regards:

JS

Reply With Quote
  #2  
Old October 31st, 2004, 03:25 PM
skidder skidder is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 15 skidder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to skidder
Can you please try Firebird 1.5.2 from http://www.firebirdsql.org/download/prerelease ?

The version script change may actually solve problem with linking UDFs with fbclient.

Reply With Quote
  #3  
Old April 2nd, 2005, 03:32 AM
leonbadman leonbadman is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 2 leonbadman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 39 m 52 sec
Reputation Power: 0
Quote:
Originally Posted by singhjoga
Guys, if you remeber me, I have been flooding all the user groups
related to firebird, with my problem related to firebird using huge
amount of memory. Now finally I have found the root cause of my
problem.

It is the udf library 'fbudf', which comes with the firebird
distribution. BUT there is nothing wrong with the code as such. I
discovered that when any udf library is linked with 'libfbclient',
memory is not properly freed up. But then there are some functions in
fbudf, which require libfbclient (i.e. call to isc_decode_timestamp,
isc_encode_timestamp etc.). So if you don't link fbudf with
libfbclient, those functions (addYear) don't respond. Here is what I
did for fbudf:

1. Copied the source code related to isc_decode_timestamp,
isc_encode_timestamp and related functions into a new C file.

2. Removed the linking of libfbclient.

3. Linked the new C file with 'fbudf'.

AND guess what? It is running since saturday without a single byte
increase. Moreover I was amazed to see the low footprint of firebird.
It is using only 3MB.

The above behaviour can be easily reproduced by linking any udf
library with libfbclient (even if you don't make any call to the
libfbclient). Then see the difference in memory usage, after making
good number of calls to any function in that udf library.

Guys thanks a lot for your help.

Regards:

JS


hi JS, my problem is http://forums.devshed.com/t240692/s.html
.
As you can see this is the same problem. Please give me more details about your procedure to solve the problem. (i.e in point 1: Do you copy the source file directly from firebird source ?, ...)

Thanx


--
Ciao
L.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Root cause of all my problems (fbudf+libfbclient)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway