[Fedora-directory-commits] ldapserver/ldap/servers/plugins/views views.c, 1.11, 1.12

Noriko Hosoi nhosoi at fedoraproject.org
Wed Oct 15 06:30:05 UTC 2008


Author: nhosoi

Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/views
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25637/ldap/servers/plugins/views

Modified Files:
	views.c 
Log Message:
Resolves: #466702
Summary: Memory usage research: checking in the experimental code
See also: http://directory.fedoraproject.org/wiki/Memory_Usage_Research



Index: views.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/views/views.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- views.c	18 Oct 2007 00:08:32 -0000	1.11
+++ views.c	15 Oct 2008 06:30:02 -0000	1.12
@@ -542,7 +542,7 @@
 		theCache.view_count++;
 	
 
-	theCache.ppViewIndex = (viewEntry**)calloc(theCache.view_count, sizeof(viewEntry*));
+	theCache.ppViewIndex = (viewEntry**)slapi_ch_calloc(theCache.view_count, sizeof(viewEntry*));
 	if(theCache.ppViewIndex)
 	{
 		/* copy over the views */
@@ -687,7 +687,7 @@
 	/* make the space for them */
 	pView->child_count = child_count;
 	
-	pView->pChildren = calloc(child_count, sizeof(viewEntry*));
+	pView->pChildren = (void **)slapi_ch_calloc(child_count, sizeof(viewEntry*));
 
 	/* add them */
 	for(current = head; current != NULL; current = current->list.pNext)
@@ -1211,7 +1211,7 @@
 	pDn = slapi_entry_get_ndn(e);
 	
 	/* create the view */
-	pView = calloc(1, sizeof(viewEntry));
+	pView = (viewEntry *)slapi_ch_calloc(1, sizeof(viewEntry));
 	pView->pDn = slapi_ch_strdup(pDn);
 
 	if(!slapi_entry_first_attr(e, &dnAttr))
@@ -1517,7 +1517,7 @@
 		 */
 		if(modtype == LDAP_CHANGETYPE_ADD)
 		{
-			theView = calloc(1, sizeof(viewEntry));
+			theView = (viewEntry *)slapi_ch_calloc(1, sizeof(viewEntry));
 			theView->pDn = slapi_ch_strdup(pDn);
 			
 			/* get the view filter, the entryid, and the parentid */




More information about the Fedora-directory-commits mailing list