This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta: more consistent formatting of fullstops
[perl5.git] / malloc_ctl.h
CommitLineData
22f7c9c9
JH
1#ifndef MALLOC_CTL_H
2# define MALLOC_CTL_H
3
4struct perl_mstats {
5 UV *nfree;
6 UV *ntotal;
7 IV topbucket, topbucket_ev, topbucket_odd, totfree, total, total_chain;
8 IV total_sbrk, sbrks, sbrk_good, sbrk_slack, start_slack, sbrked_remains;
9 IV minbucket;
10 /* Level 1 info */
11 UV *bucket_mem_size;
12 UV *bucket_available_size;
13 UV nbuckets;
14};
15typedef struct perl_mstats perl_mstats_t;
16
158cfab6
JD
17PERL_CALLCONV Malloc_t Perl_malloc (MEM_SIZE nbytes);
18PERL_CALLCONV Malloc_t Perl_calloc (MEM_SIZE elements, MEM_SIZE size);
19PERL_CALLCONV Malloc_t Perl_realloc (Malloc_t where, MEM_SIZE nbytes);
22f7c9c9
JH
20/* 'mfree' rather than 'free', since there is already a 'perl_free'
21 * that causes clashes with case-insensitive linkers */
158cfab6 22PERL_CALLCONV Free_t Perl_mfree (Malloc_t where);
22f7c9c9
JH
23
24#ifndef NO_MALLOC_DYNAMIC_CFG
25
6af660ee 26/* IV configuration data */
22f7c9c9
JH
27enum {
28 MallocCfg_FIRST_SBRK,
29 MallocCfg_MIN_SBRK,
30 MallocCfg_MIN_SBRK_FRAC1000,
31 MallocCfg_SBRK_ALLOW_FAILURES,
32 MallocCfg_SBRK_FAILURE_PRICE,
33 MallocCfg_sbrk_goodness,
34
35 MallocCfg_filldead,
36 MallocCfg_fillalive,
37 MallocCfg_fillcheck,
38
39 MallocCfg_skip_cfg_env,
40 MallocCfg_cfg_env_read,
41
42 MallocCfg_emergency_buffer_size,
43 MallocCfg_emergency_buffer_last_req,
44
45 MallocCfg_emergency_buffer_prepared_size,
46
47 MallocCfg_last
48};
6af660ee
IZ
49/* char* configuration data */
50enum {
51 MallocCfgP_emergency_buffer,
52 MallocCfgP_emergency_buffer_prepared,
53 MallocCfgP_last
54};
a7433df8 55START_EXTERN_C
22f7c9c9 56extern IV *MallocCfg_ptr;
6af660ee 57extern char **MallocCfgP_ptr;
a7433df8 58END_EXTERN_C
22f7c9c9
JH
59
60#endif
61
62#endif