Subversion Repositories HelenOS-historic

Rev

Rev 724 | Rev 762 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 724 Rev 759
Line 33... Line 33...
33
#include <arch/types.h>
33
#include <arch/types.h>
34
#include <typedefs.h>
34
#include <typedefs.h>
35
#include <list.h>
35
#include <list.h>
36
#include <synch/spinlock.h>
36
#include <synch/spinlock.h>
37
#include <mm/buddy.h>
37
#include <mm/buddy.h>
-
 
38
#include <mm/slab.h>
38
 
39
 
39
#define ONE_FRAME   0
40
#define ONE_FRAME   0
40
 
41
 
41
#define FRAME_KA        1   /* skip frames conflicting with user address space */
42
#define FRAME_KA        1   /* skip frames conflicting with user address space */
42
#define FRAME_PANIC     2   /* panic on failure */
43
#define FRAME_PANIC     2   /* panic on failure */
43
#define FRAME_NON_BLOCKING  4   /* do not panic and do not sleep on failure */
44
#define FRAME_ATOMIC            4   /* do not panic and do not sleep on failure */
44
 
45
 
45
#define FRAME_OK        0   /* frame_alloc return status */
46
#define FRAME_OK        0   /* frame_alloc return status */
46
#define FRAME_NO_MEMORY     1   /* frame_alloc return status */
47
#define FRAME_NO_MEMORY     1   /* frame_alloc return status */
47
#define FRAME_ERROR     2   /* frame_alloc return status */
48
#define FRAME_ERROR     2   /* frame_alloc return status */
48
 
49
 
Line 75... Line 76...
75
 
76
 
76
struct frame {
77
struct frame {
77
    count_t refcount;   /**< tracking of shared frames  */
78
    count_t refcount;   /**< tracking of shared frames  */
78
    __u8 buddy_order;   /**< buddy system block order */
79
    __u8 buddy_order;   /**< buddy system block order */
79
    link_t buddy_link;  /**< link to the next free block inside one order */
80
    link_t buddy_link;  /**< link to the next free block inside one order */
-
 
81
    slab_slab_t *slab;      /**< If allocated by slab, this points there */
80
};
82
};
81
 
83
 
82
struct region {
84
struct region {
83
    __address base;
85
    __address base;
84
    size_t size;
86
    size_t size;