Bug 466702
| Summary: | Memory usage research: checking in the experimental code | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Retired] 389 | Reporter: | Noriko Hosoi <nhosoi> | ||||||||||
| Component: | Directory Server | Assignee: | Noriko Hosoi <nhosoi> | ||||||||||
| Status: | CLOSED NOTABUG | QA Contact: | Chandrasekar Kannan <ckannan> | ||||||||||
| Severity: | medium | Docs Contact: | |||||||||||
| Priority: | medium | ||||||||||||
| Version: | 1.1.3 | CC: | benl, jgalipea, nkinder, rmeggins | ||||||||||
| Target Milestone: | --- | ||||||||||||
| Target Release: | --- | ||||||||||||
| Hardware: | All | ||||||||||||
| OS: | Linux | ||||||||||||
| Whiteboard: | |||||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
| Doc Text: | Story Points: | --- | |||||||||||
| Clone Of: | Environment: | ||||||||||||
| Last Closed: | 2009-04-01 17:09:29 UTC | Type: | --- | ||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||
| Documentation: | --- | CRM: | |||||||||||
| Verified Versions: | Category: | --- | |||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
| Embargoed: | |||||||||||||
| Bug Depends On: | |||||||||||||
| Bug Blocks: | 249650 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Noriko Hosoi
2008-10-13 01:22:41 UTC
Created attachment 320224 [details]
Files to be modified
Created attachment 320225 [details]
cvs diffs of the modified files
Change description:
. replaced malloc, calloc, realloc, strdup and free with the corresponding function implemented in ch_malloc.c
. mempool experimental code is added in #ifdef MEMPOOL_EXPERIMENTAL.
Tested on F-9 and RHEL4.
Created attachment 320226 [details] New file: mempool.c The file mempool.c contains the mempool implementation and modified slapi_ch_* functions. Currently, all the contents of the file is in ifdef MEMPOOL_EXPERIMENTAL. Also, the file is not supposed to put in Makefile.am. (The code is compilable and the works as a standalone server. See also http://directory.fedoraproject.org/wiki/Memory_Usage_Research#Issues.2FLeftovers) Description of slapi_ch_* and mempool functions: "2. Per thread memory pool combined with slapd malloc functions" in http://directory.fedoraproject.org/wiki/Memory_Usage_Research#Experiments:_modification_made_on_the_server Created attachment 320393 [details] cvs commit message (comment #2,#3) Reviewed by Nathan and Rich (Thank you!!!) Checked in into CVS HEAD. Somehow, one line was missing...
Index: mempool.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/mempool.c,v
retrieving revision 1.1
diff -t -w -U 4 -r1.1 mempool.c
--- mempool.c 15 Oct 2008 06:30:05 -0000 1.1
+++ mempool.c 6 Nov 2008 00:59:54 -0000
@@ -233,8 +233,9 @@
maxfreelist = config_get_mempool_maxfreelist();
if ((maxfreelist > 0) && (my_mempool[type].mempool_count > maxfreelist)) {
return LDAP_UNWILLING_TO_PERFORM;
} else {
+ ((struct mempool_object *)object)->mempool_next = mempool[type].mempool_head;
my_mempool[type].mempool_head = (struct mempool_object *)object;
my_mempool[type].mempool_cleanup_fn = cleanup;
my_mempool[type].mempool_count++;
PR_SetThreadPrivate (mempool_index, (void *)my_mempool);
Note: since the code I checked in is purely experimental and there is no way to build unless manually modify the build files, there is no need to be verified. no need to verify - closing bug. |