bug fixes from modules/malloc; changed formats to use %p
This commit is contained in:
@@ -18,19 +18,19 @@ publicdata mallink *ml_last;
|
||||
|
||||
#define __bits(ml) ((size_type)_phys_prev_of(ml) & BITS)
|
||||
#define __free_of(ml) ((size_type)_phys_prev_of(ml) & FREE_BIT)
|
||||
#define __phys_prev_of(ml) (mallink *)((size_type)_phys_prev_of(ml) & ~FREE_BIT)
|
||||
#define __phys_prev_of(ml) (mallink *)((size_type)_phys_prev_of(ml) & ~BITS)
|
||||
#define prev_size_of(ml) ((char *)(ml) - \
|
||||
(char *)__phys_prev_of(ml) - \
|
||||
mallink_size() \
|
||||
)
|
||||
#define set_phys_prev(ml,e) \
|
||||
(_phys_prev_of(ml) = (mallink *) ((char *)e + __free_of(ml)))
|
||||
(_phys_prev_of(ml) = (mallink *) ((char *)e + __bits(ml)))
|
||||
|
||||
#ifdef CHECK
|
||||
public Error(const char *fmt, const char *s, mallinkl *ml);
|
||||
public Error(const char *fmt, const char *s, mallink *ml);
|
||||
#define phys_prev_of(ml) (mallink *) \
|
||||
(first_mallink(ml) ? \
|
||||
(char *)Error("phys_prev_of first_mallink %ld", "somewhere", ml) : \
|
||||
(char *)Error("phys_prev_of first_mallink %p", "somewhere", ml) : \
|
||||
(char *)__phys_prev_of(ml) \
|
||||
)
|
||||
#else /* ndef CHECK */
|
||||
|
||||
Reference in New Issue
Block a user