[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r26690 - libmicrohttpd/src/daemon
From: |
gnunet |
Subject: |
[GNUnet-SVN] r26690 - libmicrohttpd/src/daemon |
Date: |
Sun, 31 Mar 2013 19:02:07 +0200 |
Author: grothoff
Date: 2013-03-31 19:02:07 +0200 (Sun, 31 Mar 2013)
New Revision: 26690
Modified:
libmicrohttpd/src/daemon/memorypool.c
libmicrohttpd/src/daemon/memorypool.h
Log:
-formatting
Modified: libmicrohttpd/src/daemon/memorypool.c
===================================================================
--- libmicrohttpd/src/daemon/memorypool.c 2013-03-31 01:24:01 UTC (rev
26689)
+++ libmicrohttpd/src/daemon/memorypool.c 2013-03-31 17:02:07 UTC (rev
26690)
@@ -42,6 +42,11 @@
*/
#define ROUND_TO_ALIGN(n) ((n+(ALIGN_SIZE-1)) & (~(ALIGN_SIZE-1)))
+
+/**
+ * Handle for a memory pool. Pools are not reentrant and must not be
+ * used by multiple threads.
+ */
struct MemoryPool
{
@@ -71,6 +76,7 @@
int is_mmap;
};
+
/**
* Create a memory pool.
*
@@ -110,6 +116,7 @@
return pool;
}
+
/**
* Destroy a memory pool.
*/
@@ -125,6 +132,7 @@
free (pool);
}
+
/**
* Allocate size bytes from the pool.
* @return NULL if the pool cannot support size more
@@ -152,6 +160,7 @@
return ret;
}
+
/**
* Reallocate a block of memory obtained from the pool.
* This is particularly efficient when growing or
@@ -209,6 +218,7 @@
return NULL;
}
+
/**
* Clear all entries from the memory pool except
* for "keep" of the given "size".
@@ -237,5 +247,4 @@
}
-
/* end of memorypool.c */
Modified: libmicrohttpd/src/daemon/memorypool.h
===================================================================
--- libmicrohttpd/src/daemon/memorypool.h 2013-03-31 01:24:01 UTC (rev
26689)
+++ libmicrohttpd/src/daemon/memorypool.h 2013-03-31 17:02:07 UTC (rev
26690)
@@ -37,18 +37,23 @@
*/
struct MemoryPool;
+
/**
* Create a memory pool.
*
* @param max maximum size of the pool
*/
-struct MemoryPool *MHD_pool_create (size_t max);
+struct MemoryPool *
+MHD_pool_create (size_t max);
+
/**
* Destroy a memory pool.
*/
-void MHD_pool_destroy (struct MemoryPool *pool);
+void
+MHD_pool_destroy (struct MemoryPool *pool);
+
/**
* Allocate size bytes from the pool.
*
@@ -58,9 +63,11 @@
* @return NULL if the pool cannot support size more
* bytes
*/
-void *MHD_pool_allocate (struct MemoryPool *pool,
- size_t size, int from_end);
+void *
+MHD_pool_allocate (struct MemoryPool *pool,
+ size_t size, int from_end);
+
/**
* Reallocate a block of memory obtained from the pool.
* This is particularly efficient when growing or
@@ -77,11 +84,13 @@
* NULL if the pool cannot support new_size
* bytes (old continues to be valid for old_size)
*/
-void *MHD_pool_reallocate (struct MemoryPool *pool,
- void *old,
- size_t old_size,
- size_t new_size);
+void *
+MHD_pool_reallocate (struct MemoryPool *pool,
+ void *old,
+ size_t old_size,
+ size_t new_size);
+
/**
* Clear all entries from the memory pool except
* for "keep" of the given "size".
@@ -90,8 +99,9 @@
* @param size how many bytes need to be kept at this address
* @return addr new address of "keep" (if it had to change)
*/
-void *MHD_pool_reset (struct MemoryPool *pool,
- void *keep,
- size_t size);
+void *
+MHD_pool_reset (struct MemoryPool *pool,
+ void *keep,
+ size_t size);
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r26690 - libmicrohttpd/src/daemon,
gnunet <=