beta-0.89.2
[luatex.git] / source / libs / cairo / cairo-src / src / cairo-freelist-type-private.h
blob4dd056461078cff59eb6a2bde2c88c278db1ce63
1 /*
2 * Copyright © 2010 Joonas Pihlaja
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that copyright
7 * notice and this permission notice appear in supporting documentation, and
8 * that the name of the copyright holders not be used in advertising or
9 * publicity pertaining to distribution of the software without specific,
10 * written prior permission. The copyright holders make no representations
11 * about the suitability of this software for any purpose. It is provided "as
12 * is" without express or implied warranty.
14 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
20 * OF THIS SOFTWARE.
22 #ifndef CAIRO_FREELIST_TYPE_H
23 #define CAIRO_FREELIST_TYPE_H
25 #include "cairo-types-private.h"
26 #include "cairo-compiler-private.h"
28 typedef struct _cairo_freelist_node cairo_freelist_node_t;
29 struct _cairo_freelist_node {
30 cairo_freelist_node_t *next;
33 typedef struct _cairo_freelist {
34 cairo_freelist_node_t *first_free_node;
35 unsigned nodesize;
36 } cairo_freelist_t;
38 typedef struct _cairo_freelist_pool cairo_freelist_pool_t;
39 struct _cairo_freelist_pool {
40 cairo_freelist_pool_t *next;
41 unsigned size, rem;
42 uint8_t *data;
45 typedef struct _cairo_freepool {
46 cairo_freelist_node_t *first_free_node;
47 cairo_freelist_pool_t *pools;
48 cairo_freelist_pool_t *freepools;
49 unsigned nodesize;
50 cairo_freelist_pool_t embedded_pool;
51 uint8_t embedded_data[1000];
52 } cairo_freepool_t;
54 #endif /* CAIRO_FREELIST_TYPE_H */