mirror of
https://github.com/tailix/libkernaux.git
synced 2024-11-13 11:04:27 -05:00
35 lines
628 B
C
35 lines
628 B
C
#include <kernaux/pfa.h>
|
|
|
|
#include <assert.h>
|
|
|
|
int main()
|
|
{
|
|
struct KernAux_PFA pfa;
|
|
|
|
assert(KernAux_PFA_initialize_start(&pfa));
|
|
|
|
assert(KernAux_PFA_initialize_add_zone(
|
|
&pfa,
|
|
"foo",
|
|
0,
|
|
16 * 1024 * 1024 - 1
|
|
));
|
|
|
|
assert(KernAux_PFA_initialize_add_zone(
|
|
&pfa,
|
|
"bar",
|
|
16 * 1024 * 1024,
|
|
896 * 1024 * 1024 - 1
|
|
));
|
|
|
|
assert(KernAux_PFA_initialize_add_zone(
|
|
&pfa,
|
|
"car",
|
|
896 * 1024 * 1024,
|
|
(unsigned long long)4 * 1024 * 1024 * 1024 - 1
|
|
));
|
|
|
|
assert(KernAux_PFA_initialize_finish(&pfa));
|
|
|
|
return 0;
|
|
}
|