1999.6.1
by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file |
1 |
/* Copyright (C) 2008 PrimeBase Technologies GmbH, Germany
|
1548.2.1
by Barry.Leslie at PrimeBase
Added the PBMS daemon plugin. |
2 |
*
|
3 |
* PrimeBase Media Stream for MySQL
|
|
4 |
*
|
|
5 |
* This program is free software; you can redistribute it and/or modify
|
|
6 |
* it under the terms of the GNU General Public License as published by
|
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
|
8 |
* (at your option) any later version.
|
|
9 |
*
|
|
10 |
* This program is distributed in the hope that it will be useful,
|
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13 |
* GNU General Public License for more details.
|
|
14 |
*
|
|
15 |
* You should have received a copy of the GNU General Public License
|
|
16 |
* along with this program; if not, write to the Free Software
|
|
1802.10.2
by Monty Taylor
Update all of the copyright headers to include the correct address. |
17 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
1548.2.1
by Barry.Leslie at PrimeBase
Added the PBMS daemon plugin. |
18 |
*
|
19 |
* Original author: Paul McCullagh (H&G2JCtL)
|
|
20 |
* Continued development: Barry Leslie
|
|
21 |
*
|
|
22 |
* 2007-06-15
|
|
23 |
*
|
|
24 |
* CORE SYSTEM:
|
|
25 |
* Memory allocation
|
|
26 |
*
|
|
27 |
*/
|
|
28 |
||
2234
by Brian Aker
Mass removal of ifdef/endif in favor of pragma once. |
29 |
#pragma once
|
1548.2.1
by Barry.Leslie at PrimeBase
Added the PBMS daemon plugin. |
30 |
#ifndef __CSMEMORY_H__
|
31 |
#define __CSMEMORY_H__
|
|
32 |
||
33 |
#include "CSDefs.h" |
|
34 |
||
35 |
bool cs_init_memory(void); |
|
36 |
void cs_exit_memory(void); |
|
37 |
||
38 |
void *cs_malloc(size_t size); |
|
39 |
void *cs_calloc(size_t size); |
|
40 |
void cs_realloc(void **ptr, size_t size); |
|
41 |
void cs_free(void *); |
|
42 |
||
43 |
#define cs_memmove(dst, src, size) memmove(dst, src, size)
|
|
44 |
#define cs_memcpy(dst, src, size) memcpy(dst, src, size)
|
|
45 |
#define cs_memset(b, v, size) memset(b, v, size)
|
|
46 |
||
47 |
#ifdef DEBUG
|
|
48 |
#define cs_malloc(siz) cs_mm_malloc(CS_CONTEXT, siz)
|
|
49 |
#define cs_calloc(siz) cs_mm_calloc(CS_CONTEXT, siz)
|
|
50 |
#define cs_realloc(ptr, siz) cs_mm_realloc(CS_CONTEXT, ptr, siz)
|
|
51 |
#define cs_free(ptr) cs_mm_free(ptr)
|
|
52 |
/*
|
|
53 |
#define cs_memmove(dst, src, size) cs_mm_memmove(dst, src, size)
|
|
54 |
#define cs_memcpy(dst, src, size) cs_mm_memcpy(dst, src, size)
|
|
55 |
#define cs_memset(b, v, size) cs_mm_memset(b, v, size)
|
|
56 |
*/
|
|
57 |
||
58 |
bool cs_mm_scan_core(void); |
|
59 |
void cs_mm_memmove(void *block, void *dest, void *source, size_t size); |
|
60 |
void cs_mm_memcpy(void *block, void *dest, void *source, size_t size); |
|
61 |
void cs_mm_memset(void *block, void *dest, int value, size_t size); |
|
62 |
void *cs_mm_malloc(const char *func, const char *file, int line, size_t size); |
|
63 |
void *cs_mm_calloc(const char *func, const char *file, int line, size_t size); |
|
64 |
void cs_mm_realloc(const char *func, const char *file, int line, void **ptr, size_t newsize); |
|
65 |
void cs_mm_free(void *ptr); |
|
66 |
void cs_mm_pfree(void **ptr); |
|
67 |
size_t cs_mm_malloc_size(void *ptr); |
|
1548.2.2
by Barry.Leslie at PrimeBase
A lot of minor changes to clean up the code and to get it to build with Drizzle. |
68 |
void cs_mm_print_track(const char *func, const char *file, uint32_t line, void *p, bool inc, uint32_t ref_cnt, int track_me); |
69 |
void cs_mm_track_memory(const char *func, const char *file, uint32_t line, void *p, bool inc, uint32_t ref_cnt, int track_me); |
|
1841.1.3
by Barry.Leslie at PrimeBase
Merged changes from lp:pbms. These changes should remove any danger |
70 |
uint32_t cs_mm_get_check_point(); |
71 |
void cs_mm_assert_check_point(uint32_t check_point); |
|
1548.2.1
by Barry.Leslie at PrimeBase
Added the PBMS daemon plugin. |
72 |
#endif
|
73 |
||
74 |
#endif
|
|
75 |