Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/reserve.c

    r19c8030 r8d308b9  
    4242#include <typedefs.h>
    4343#include <arch/types.h>
    44 #include <debug.h>
    45 
    46 static bool reserve_initialized = false;
    4744
    4845IRQ_SPINLOCK_STATIC_INITIALIZE_NAME(reserve_lock, "reserve_lock");
     
    5754{
    5855        reserve = frame_total_free_get();
    59         reserve_initialized = true;
    6056}
    6157
     
    7167{
    7268        bool reserved = false;
    73 
    74         ASSERT(reserve_initialized);
    7569
    7670        irq_spinlock_lock(&reserve_lock, true);
     
    117111void reserve_force_alloc(size_t size)
    118112{
    119         if (!reserve_initialized)
    120                 return;
    121 
    122113        irq_spinlock_lock(&reserve_lock, true);
    123114        reserve -= size;
     
    131122void reserve_free(size_t size)
    132123{
    133         if (!reserve_initialized)
    134                 return;
    135 
    136124        irq_spinlock_lock(&reserve_lock, true);
    137125        reserve += size;
Note: See TracChangeset for help on using the changeset viewer.