annotate audacious/memorypool.h @ 2270:50dea14e2fa3 trunk

[svn] Serbian language upadated
author kustodian
date Thu, 04 Jan 2007 14:55:34 -0800
parents 4446a9e7bdee
children 9fc150e3542e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2223
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
1 /* Audacious
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
2 * Copyright (c) 2007 William Pitcock <nenolod -at- atheme.org>
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
3 *
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
4 * This program is free software; you can redistribute it and/or modify
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
6 * the Free Software Foundation; under version 2 of the License.
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
7 *
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
8 * This program is distributed in the hope that it will be useful,
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
11 * GNU General Public License for more details.
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
12 *
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
13 * You should have received a copy of the GNU General Public License
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
14 * along with this program; if not, write to the Free Software
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
16 */
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
17
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
18 #ifndef AUDACIOUS_MEMORYPOOL_H
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
19 #define AUDACIOUS_MEMORYPOOL_H
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
20
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
21 typedef struct _MemoryPool MemoryPool;
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
22
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
23 MemoryPool * memory_pool_new(void);
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
24 MemoryPool * memory_pool_with_custom_destructor(GDestroyNotify notify);
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
25
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
26 gpointer memory_pool_allocate(MemoryPool * pool, gsize sz);
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
27 void memory_pool_release(MemoryPool * pool, gpointer addr);
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
28
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
29 void memory_pool_cleanup(MemoryPool * pool);
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
30
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
31 void memory_pool_destroy(MemoryPool * pool);
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
32
2224
4446a9e7bdee [svn] - memory_pool_alloc_object()
nenolod
parents: 2223
diff changeset
33 gchar * memory_pool_strdup(MemoryPool * pool, gchar * src);
4446a9e7bdee [svn] - memory_pool_alloc_object()
nenolod
parents: 2223
diff changeset
34
4446a9e7bdee [svn] - memory_pool_alloc_object()
nenolod
parents: 2223
diff changeset
35 #define memory_pool_alloc_object(pool, obj) \
4446a9e7bdee [svn] - memory_pool_alloc_object()
nenolod
parents: 2223
diff changeset
36 memory_pool_allocate(pool, sizeof(obj))
4446a9e7bdee [svn] - memory_pool_alloc_object()
nenolod
parents: 2223
diff changeset
37
2223
e0d7335f56c3 [svn] - MemoryPool, a simple performance-oriented memory pool.
nenolod
parents:
diff changeset
38 #endif