8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-01 23:20:39 +01:00
Commit Graph

160 Commits

Author SHA1 Message Date
dimitr
1ebc716eb2 Misc. 2008-05-25 07:19:31 +00:00
dimitr
6a593eca17 Implemented CORE-1751. The changes include:
1) Make memory counters aggregated.
2) Add attachment pool and allocate appropriate resources out of this pool.
3) Always release attachments explicitly (via destructor).
4) Always delete user requests prior to attachment deletion.
5) Introduce memory usage counters per every monitoring object.
6) Misc refactoring.
Some pieces are still incomplete (although everything basically works), but I'd like to get feedback and testing sooner rather than later.
2008-05-06 08:41:24 +00:00
asfernandes
b2abfa3d8b Compatibility with Valgrind 3.3 2008-04-27 18:53:33 +00:00
asfernandes
cfb2b8ee91 Misc 2008-04-23 02:19:25 +00:00
robocop
05271261e1 Style. 2008-04-19 11:11:10 +00:00
asfernandes
3aca6f92b1 Misc 2008-03-21 02:42:24 +00:00
dimitr
13f5cc92e1 Major cleanup of the old-style blk and allocator-based blk_type. 2008-03-19 16:09:00 +00:00
dimitr
e3e9d3c172 Cleanup. 2008-02-20 15:25:20 +00:00
dimitr
d61abb2710 Misc. 2008-01-29 11:57:35 +00:00
dimitr
2b89d48d8f Misc. 2008-01-29 10:20:41 +00:00
alexpeshkoff
fa4354b0f3 Remove conditional compilation - it was raising hell in windows build 2008-01-24 15:01:02 +00:00
alexpeshkoff
0943027a19 do not initialize context pool in init() - TLS may be not ready for it 2008-01-24 11:09:37 +00:00
dimitr
e1d53429ae Fixed the win32 build. 2008-01-23 19:27:36 +00:00
asfernandes
aea2bcb354 Misc 2008-01-23 19:03:16 +00:00
alexpeshkoff
39896cb955 Fixed CORE-1671: atexit() calls in client libraries cause segfaults
and CORE-1079: Every attach of fbclient/fbembed library leaks 64KB of memory

To do it:
- created new template GlobalPtr, controlling access to destructors of global objects.
- applied it to global objects.

Also some related cleanup.
2008-01-23 15:52:40 +00:00
dimitr
af1a7bd430 Fixed the wrong assertion. 2007-09-17 05:56:16 +00:00
robocop
4211bbddd8 Misc. 2007-07-29 02:30:35 +00:00
alexpeshkoff
8eb5b9d7a1 Backported fix for spare space in MemoryPool 2007-07-27 13:40:39 +00:00
alexpeshkoff
2164354c90 misc 2007-05-08 08:50:17 +00:00
asfernandes
9d0d8bf2db Misc 2007-05-04 01:18:25 +00:00
alexpeshkoff
6f8fb87780 Front-ported fix for CORE-1240 - any task, using libfbclient, hangs on exit on Darwin/PPC 2007-05-03 13:52:16 +00:00
dchri
42ffcc8a5d Renamed struct small to mbk_small 2007-04-11 15:55:30 +00:00
alexpeshkoff
ed7baa5dc2 Misc 2007-04-05 12:35:39 +00:00
alexpeshkoff
c4c0764569 frontported from 2.0: fixed races on Darwin/386 during init 2007-04-04 12:21:09 +00:00
dimitr
fd3172ad8d Fixed allocator assertion for some platflorms with ALIGNMENT == 8. 2007-02-05 13:33:30 +00:00
alexpeshkoff
13695f4993 redefinition of new/delete in non-STL case 2006-06-06 11:21:33 +00:00
robocop
9886d09647 Misc. 2006-05-20 04:22:07 +00:00
alexpeshkoff
b056a118b5 1. Avoid use of STL
2. Reworked exceptions to make status_exception always hold correct status vector
3. Avoid use of RTTI
2006-05-19 15:17:02 +00:00
dimitr
aa7a83fa99 Don't use spinlocks until FB3. 2006-05-03 10:50:13 +00:00
dimitr
b4304d3998 Let's separate Mutex and Spinlock. 2006-05-03 05:44:26 +00:00
robocop
c5f2284b15 Style. 2006-04-06 08:18:53 +00:00
kkuznetsov
6572fbf570 Add check for result of mmap() on Solaris platforms 2006-04-05 06:25:47 +00:00
robocop
0ff27c2af8 Don't crash the debug build if the allocations report file cannot be opened. 2005-12-24 07:28:31 +00:00
dimitr
c00ffe7ec0 Fixed the default memory management in fbclient.
Avoid crashing the server when fbclient is used in its address space.
2005-02-16 08:46:48 +00:00
robocop
4d41decc4f Misc. 2004-12-22 08:49:26 +00:00
alexpeshkoff
e7d4b79b12 use context pool in AutoStorage class 2004-12-17 11:13:24 +00:00
robocop
d6535351a2 Misc: style. 2004-11-24 09:22:07 +00:00
robocop
eb99bbcccf Poor man's version of the old gds_alloc_report. 2004-11-17 08:56:07 +00:00
skidder
b29f8356c5 Implement routines for convenient dumping of memory pools under debugger 2004-10-25 05:14:12 +00:00
robocop
efefff581e Change Pascal AND to C++ &&
Thanks to Marlena Miller that couldn't compile.
2004-10-11 10:00:37 +00:00
robocop
ed17cfafbf Style:
if<space>(
for<space>(
switch<space>(
while<space>(
2004-10-04 08:15:00 +00:00
skidder
02a0915156 Teach engine to work with larger record numbers - 64-bit internally, 40-bit externally 2004-09-28 06:28:38 +00:00
skidder
a28561fcf5 Look up Valgrind header in more appropriate place 2004-09-01 09:36:44 +00:00
skidder
7a85d40428 Fix typo and small bug in memory manager test code 2004-08-28 23:14:46 +00:00
skidder
6c9402b881 fix handling of zero-length allocations, fix rare memory management error, add quick pool verification logic 2004-08-28 05:18:42 +00:00
robocop
305b9088f4 misc 2004-08-26 11:04:14 +00:00
skidder
035ac89d7c Clarify comment and update assertion check 2004-08-25 03:09:57 +00:00
brodsom
57528f8bc2 Avoid variable shadowing 2004-08-24 23:11:02 +00:00
robocop
24aab1bd43 Renamed ptr_block to ptrToBLock and block_ptr to blockToPtr for better self-documenting code as agreed privately. No functional change. 2004-08-24 05:16:01 +00:00
skidder
a1371e4ffa Slightly streamline logic of allocation critical path. Correct 2 memory manager bugs added during last optimization attempt. We are now ~40faster than malloc from GLIBC 2.3 2004-08-22 21:28:19 +00:00
robocop
6be277355f Misc: formatting 2004-08-21 09:18:24 +00:00
skidder
706e941871 Old Valgrind stacktraces need to be cleaned up on pool destruction 2004-08-18 23:39:43 +00:00
skidder
158cc8b30b Optimize memory manager a little bit 2004-08-10 04:10:47 +00:00
skidder
0374e1a9fd Fix memory manager to allow reliable detection of references to memory from deleted pools under Valgrind. Make memory usage statistics more accurate both in Valgrind and general cases. Adjust pool dumping routine to be aware of delayed free blocks 2004-08-09 01:24:54 +00:00
skidder
b980507ad2 Valgrind support 2004-07-30 22:38:08 +00:00
skidder
32baa87086 Change license for source files which I wrote 2004-06-30 01:26:40 +00:00
robocop
949830d0c6 1.- const correctness
2.- style
3.- Try to fix the mess caused by different data types used to represent bifields of SCL_ constants defined in scl.h,
first round. No circular dependencies found through MSVC. Still pending dyn* and grant.epp files.
2004-06-29 04:37:59 +00:00
skidder
de7fc77158 Fix bug with wrong output when printing out used only blocks from memory pool 2004-06-21 22:17:51 +00:00
brodsom
1aa7b9452c Looking for extra ; at namespace declaration end 2004-06-13 23:45:02 +00:00
kkuznetsov
234fdb0e43 Add check for caddr_t to fix compile error on Solaris munmap,
some more warnings to prefix solx86gcc, comment historycal pragmas
2004-05-13 14:05:00 +00:00
brodsom
8699aec9c9 -Avoid shadow warning 2004-05-12 19:23:17 +00:00
brodsom
e0854daa99 Removing ib_stdio.h 2004-04-28 22:00:03 +00:00
alexpeshkoff
170bef6340 moved use of fb_assert to correct place 2004-03-31 17:13:24 +00:00
robocop
1824343930 Cleanup.
Fixed a linking error with MSVC6, too.
2004-03-28 09:10:30 +00:00
skidder
dd02aa34e6 Fix Windows build after my previous commit 2004-03-25 23:36:03 +00:00
skidder
f26d84f76b 1. POSIX build libraries export only public API. 2. Unify exports for PROD_BUILD and DEV_BUILD. 3. Support for context memory pools. 4. Memory manager has lower memory overhead exceptionally on 64 bit targets 2004-03-25 23:12:50 +00:00
robocop
2ab1f94dd2 Cleanup
Some minor corrections
Second step to rename
2004-03-11 05:04:26 +00:00
skidder
b6e5ccd413 Clean up.
1. gds__alloc doesn't throw
2. Add NOMEM handlers to a couple places
3. kill HAVE_*SNPRINTF conditionals
2004-03-09 00:17:07 +00:00
robocop
e6187cecd2 Cleanup
Some bug fixes
Style
2004-03-07 07:58:55 +00:00
skidder
725b7f9972 Be slightly more portable 2004-03-02 20:23:32 +00:00
eku
b28781c507 Fixed compilation issues (missing include files, wrong defines). 2004-03-02 08:43:33 +00:00
skidder
4b5428f833 Memory pages manager 2004-03-01 03:18:42 +00:00
robocop
5c3c8abd9a Big cleanup.
God have pity on platform maintainers.
I only can compile/test Win32; sorry, folks.
2004-02-20 06:43:27 +00:00
robocop
2b295a9108 General cleanup. Sorry if I missed some occurrence. 2004-01-28 07:50:41 +00:00
robocop
db77ffa605 const correctness, variables in scope, cleanup, etc. 2003-11-07 08:06:35 +00:00
brodsom
ff070a16a8 Replacing assert with fb_assert 2003-11-03 23:59:24 +00:00
brodsom
51893d72ad - Make MinGW build again after Nickolay patch (There is a multiple definition of std::bad_alloc::~bad_alloc()) 2003-11-03 02:05:14 +00:00
skidder
e5397f4180 Ugly hack to make Firebird compatible with host applications using STL 2003-10-27 22:27:30 +00:00
skidder
77b17de987 NBACKUP-related changes and some clean-up 2003-09-08 20:23:46 +00:00
skidder
f3348c4502 Apply FreeBSD patches by Tomas Skoda 2003-08-11 11:21:21 +00:00
skidder
ce78ed1f1d 1) Make NBACKUP happy on Win32 CS too.
2) Fix tracking of OWN_hung in Win32 CS lock manager (lock-up debugging aid)
3) Fix possible unsynchronized access to memory manager in Win32 CS builds
and client library. Have shown itself as a very rare crash of Win32 CS manager
process during its startup.
4) Reduce warnings a little
Points 2 and 3 need to be backported to B1_5_Release
2003-08-10 15:43:23 +00:00
skidder
142bd2b320 No more messages about forbidden usage of global operator new in DEV_BUILD. C++ library from RH8.0 does that routinely and this causes crashes because stderr messages go to TCP socket from fb_inet_server 2003-05-07 11:13:55 +00:00
brodsom
4051c36d57 Restore inlines 2003-02-25 01:11:29 +00:00
brodsom
01681a01dc Move function definition from header to cpp and remove inline. 2003-02-16 00:20:30 +00:00
dimitr
e9c9394670 Fixed exception handling. 2003-02-13 13:44:44 +00:00
brodsom
6fb3e5ec4c Remove warning 'declaration shadows a previous local' 2003-02-13 02:19:14 +00:00
tamlin
08d027e94d Print warning messages to stderr instead of stdout 2003-02-12 19:36:27 +00:00
dimitr
0ce8652f60 Moved allocator functions back to GDS. MemoryPool is no longer exported. 2003-02-04 20:18:36 +00:00
dimitr
fb6a63fe58 Fixed bug in the memory manager. We shouldn't use the uninitialized pool. gpre_boot no longer crashes. 2003-02-04 11:18:17 +00:00
dimitr
81cbb8bb78 Reduced memory usage. 2003-02-02 13:09:55 +00:00
skidder
427ae39e57 Fixed a couple errors Mike Nordell pointed at 2003-01-30 18:05:34 +00:00
dimitr
81d3885bcc Fixed the errors pointed out by Mike. 2003-01-30 13:26:16 +00:00
dimitr
93246b6445 Fixed linkage issues on win32. 2003-01-27 11:47:04 +00:00
dimitr
733e45cf0d Cleanup. 2003-01-21 12:19:32 +00:00
skidder
e12957d7bc Fixed engine compilation problem on GCC3.2.1 2003-01-20 14:31:20 +00:00
dimitr
5dabda9323 Fixed dump of the memory usage stats. 2003-01-20 08:40:02 +00:00
skidder
884c38d6c4 Memory manager changes - added memory usage stats, empty extents are now deallocated 2003-01-18 21:45:24 +00:00
dimitr
8de1ee6484 Removed compiler warnings. 2003-01-18 18:43:52 +00:00
dimitr
c9ed6efc7f Fixed problems with the memory manager. Oddly enough, but the server seems to work ;-) 2003-01-17 09:59:59 +00:00
dimitr
30f685d014 Fixed a typo. 2003-01-17 06:41:40 +00:00