Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4349 | Serge | 1 | /* |
2 | * Copyright © 2010 Joonas Pihlaja |
||
3 | * |
||
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. |
||
13 | * |
||
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. |
||
21 | */ |
||
22 | #ifndef CAIRO_FREELIST_TYPE_H |
||
23 | #define CAIRO_FREELIST_TYPE_H |
||
24 | |||
25 | #include "cairo-types-private.h" |
||
26 | #include "cairo-compiler-private.h" |
||
27 | |||
28 | typedef struct _cairo_freelist_node cairo_freelist_node_t; |
||
29 | struct _cairo_freelist_node { |
||
30 | cairo_freelist_node_t *next; |
||
31 | }; |
||
32 | |||
33 | typedef struct _cairo_freelist { |
||
34 | cairo_freelist_node_t *first_free_node; |
||
35 | unsigned nodesize; |
||
36 | } cairo_freelist_t; |
||
37 | |||
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; |
||
43 | }; |
||
44 | |||
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; |
||
53 | |||
54 | #endif /* CAIRO_FREELIST_TYPE_H */ |