Subversion Repositories HelenOS

Rev

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

Rev 2071 Rev 2250
Line 45... Line 45...
45
 
45
 
46
    /* Enforce minimal alignment. */
46
    /* Enforce minimal alignment. */
47
    alignment = ALIGN_UP(alignment, 4);
47
    alignment = ALIGN_UP(alignment, 4);
48
   
48
   
49
    addr = ballocs->base + ALIGN_UP(ballocs->size, alignment);
49
    addr = ballocs->base + ALIGN_UP(ballocs->size, alignment);
-
 
50
 
-
 
51
    if (ALIGN_UP(ballocs->size, alignment) + size > BALLOC_MAX_SIZE)
-
 
52
        return NULL;
50
   
53
       
51
    ballocs->size = ALIGN_UP(ballocs->size, alignment) + size;
54
    ballocs->size = ALIGN_UP(ballocs->size, alignment) + size;
52
   
55
   
53
    return (void *) addr;
56
    return (void *) addr;
54
}
57
}