Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/lib/ra.h

    r1295a1da r02667d9  
    7171typedef struct {
    7272        link_t segment_link;    /**< Span's segment list link. */
    73         link_t fu_link;         /**< Span's free list or used hash link. */
     73
     74        /*
     75         * A segment cannot be both on the free list and in the used hash.
     76         * Their respective links can therefore occupy the same space.
     77         */
     78        union {
     79                link_t fl_link;         /**< Span's free list link. */
     80                ht_link_t uh_link;      /**< Span's used hash link. */
     81        };
    7482
    7583        uintptr_t base;         /**< Segment base. */
     
    7987extern void ra_init(void);
    8088extern ra_arena_t *ra_arena_create(void);
     89extern void ra_arena_destroy(ra_arena_t *);
    8190extern bool ra_span_add(ra_arena_t *, uintptr_t, size_t);
    82 extern uintptr_t ra_alloc(ra_arena_t *, size_t, size_t);
     91extern bool ra_alloc(ra_arena_t *, size_t, size_t, uintptr_t *);
    8392extern void ra_free(ra_arena_t *, uintptr_t, size_t);
    8493
Note: See TracChangeset for help on using the changeset viewer.