File: memalloc.h

package info (click to toggle)
uswsusp 1.0+20120915-6.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,572 kB
  • ctags: 1,440
  • sloc: ansic: 7,164; sh: 566; makefile: 223; perl: 65
file content (31 lines) | stat: -rw-r--r-- 700 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * memalloc.h
 *
 * Memory allocation definitions for user land hibernation utilities.
 *
 * Copyright (C) 2008 Rafael J. Wysocki <rjw@sisk.pl>
 *
 * This file is released under the GPLv2.
 *
 */

struct mem_slot {
	void *addr;
	size_t size;
};

#define ALIGN_QWORD	8

#define BUFFER_PAGES	32

extern unsigned int page_size;
/* This MUST be an multipe of page_size */
extern unsigned int buffer_size;

extern void get_page_and_buffer_sizes(void);
extern size_t round_up_page_size(size_t size);
extern size_t round_down_page_size(size_t size);
extern int init_memalloc(size_t aux, size_t pool);
extern void *getmem(size_t size);
extern void freemem(void *address);
extern void free_memalloc(void);