Changeset 810 for trunk/src/emx/include


Ignore:
Timestamp:
Oct 6, 2003, 2:55:10 AM (22 years ago)
Author:
bird
Message:

#608: High memory support.

Location:
trunk/src/emx/include
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/emx/umalloc.h

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r809 r810  
    77extern "C" {
    88#endif
     9
     10/* include all we need here to make life easier. */
     11#include <stddef.h>
     12#include <umalloc.h>
     13#include <sys/builtin.h>
     14#include <sys/fmutex.h>
     15#include <sys/rmutex.h>
     16#include <sys/uflags.h>
    917
    1018/* =========================== Introduction =========================== */
     
    221229
    222230#define _UM_TILE_OK(p,s)      (_UM_TILE_ALIGNED ((p), (s)) \
    223                                && _UM_TILE_TILED ((p), (s))) 
     231                               && _UM_TILE_TILED ((p), (s)))
    224232
    225233/* Compute the smallest number X such that P will be aligned on a A
     
    603611
    604612/* Note that _um_regular_heap is declared in <umalloc.h>.
    605    _um_tiled_heap isn't, so we declare it here. */
     613   the others aren't, so we declare them here. */
    606614
    607615extern Heap_t _um_tiled_heap;
     616extern Heap_t _um_high_heap;
     617extern Heap_t _um_low_heap;
    608618
    609619
     
    710720int _um_find_bucket (size_t);
    711721void _um_free_maybe_lock (void *, int);
    712 void _um_init_default_regular_heap (void);
    713 void _um_init_default_tiled_heap (void);
     722Heap_t _um_init_default_regular_heap (void);
     723Heap_t _um_init_default_tiled_heap (void);
    714724void *_um_lump_alloc (Heap_t, size_t, size_t, unsigned);
    715725void _um_lump_coalesce_free (Heap_t, struct _um_lump *, struct _um_seg *,
     
    725735int _um_walk_no_lock (Heap_t, _um_callback2 *, void *);
    726736
     737
     738/** @group Low Memory Heap Routines.
     739 * Intended for internal LIBC use. First call to any of these routines
     740 * will initialize the heap.
     741 * @{ */
     742void *  _lmalloc(size_t);
     743void *  _lcalloc(size_t, size_t);
     744void *  _lrealloc(void *, size_t);
     745Heap_t  _linitheap(void);
     746/** @} */
     747
     748/** @group High Memory Heap Routines.
     749 * Intended for internal LIBC use. First call to any of these routines
     750 * will initialize the heap.
     751 * @{ */
     752void *  _hmalloc(size_t);
     753void *  _hcalloc(size_t, size_t);
     754void *  _hrealloc(void *, size_t);
     755Heap_t  _hinitheap(void);
     756void *  __libc_HimemDefaultAlloc(Heap_t Heap, size_t *pcb, int *pfClean);
     757void    __libc_HimemDefaultRelease(Heap_t Heap, void *pv, size_t cb);
     758int     __libc_HasHighMem(void);
     759/** @} */
     760
     761
     762/** @group Default Heap Voting.
     763 * @{ */
     764void    __libc_HeapVote(int fDefaultHeapInHighMem);
     765void    __libc_HeapEndVoting(void);
     766int     __libc_HeapGetResult(void);
     767/** @} */
     768
     769
     770
    727771/* Inline functions. */
    728772
     
    763807{
    764808  /* Use the 'syscall' write for safest possible path. */
    765   extern int __write (int handle, const void *buf, size_t nbytes); 
     809  extern int __write (int handle, const void *buf, size_t nbytes);
    766810  __write (2, "\r\n!_um_abort!", 13);
    767811  if (pszmsg)
    768812    {
    769813      const char *psz = pszmsg;
    770       while (*psz) 
     814      while (*psz)
    771815        psz++;
    772816      __write (2, " ", 1);
  • trunk/src/emx/include/stdlib.h

    • Property cvs2svn:cvs-rev changed from 1.15 to 1.16
    r809 r810  
    180180 */
    181181#if __POSIX_VISIBLE /* >= ??? */
    182 /* int   posix_memalign(void **, size_t, size_t); (ADV) */
     182int      posix_memalign(void **, size_t, size_t); /* bird: we implement this. */
    183183/** @todo int    rand_r(unsigned *);    */              /* (TSF) */
    184184int      setenv(const char *, const char *, int);
  • trunk/src/emx/include/umalloc.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r809 r810  
    4747#define _HEAP_TILED     0x02
    4848#define _HEAP_SHARED    0x04
     49#define _HEAP_HIGHMEM   0x08 /* advisory flag */
    4950
    5051#define _BLOCK_CLEAN    1
     
    9596void *_utmalloc (Heap_t, size_t);
    9697
    97 
    9898#if defined (__cplusplus)
    9999}
Note: See TracChangeset for help on using the changeset viewer.