home *** CD-ROM | disk | FTP | other *** search
/ Solo Programadores 22 / SOLO_22.iso / packages / win32ada / data.z / win32-malloc.ads < prev    next >
Encoding:
Text File  |  1996-03-15  |  4.5 KB  |  94 lines

  1. -- $Source: /home/harp/1/proto/monoBANK/winnt/win32-malloc.ads,v $ 
  2. -- $Revision: 1.7 $ $Date: 96/03/15 12:53:32 $ $Author: stm $ 
  3. -- See end of file for Copyright (c) information.
  4.  
  5. with Win32.Strings;
  6.  
  7. package Win32.Malloc is
  8.  
  9.     HEAP_MAXREQ            : constant := 16#ffff_ffd8#;     -- malloc.h:51
  10.     HEAPEMPTY              : constant := -1;                -- malloc.h:54
  11.     HEAPOK                 : constant := -2;                -- malloc.h:55
  12.     HEAPBADBEGIN           : constant := -3;                -- malloc.h:56
  13.     HEAPBADNODE            : constant := -4;                -- malloc.h:57
  14.     HEAPEND                : constant := -5;                -- malloc.h:58
  15.     HEAPBADPTR             : constant := -6;                -- malloc.h:59
  16.     FREEENTRY              : constant := 0;                 -- malloc.h:60
  17.     USEDENTRY              : constant := 1;                 -- malloc.h:61
  18.  
  19.     type HEAPINFO is                                        -- malloc.h:64
  20.         record
  21.             pentry : Win32.PINT;                            -- malloc.h:65
  22.             size   : Win32.Strings.size_t;                  -- malloc.h:66
  23.             useflag: Win32.INT;                             -- malloc.h:67
  24.         end record;
  25.  
  26.     function calloc(num : Win32.Strings.size_t;
  27.                     size: Win32.Strings.size_t)
  28.                           return Win32.PVOID;               -- malloc.h:74
  29.  
  30.     procedure free(memblock: Win32.PVOID);                  -- malloc.h:75
  31.  
  32.     function malloc(size: Win32.Strings.size_t) 
  33.         return Win32.PVOID;                                 -- malloc.h:76
  34.  
  35.     function realloc(memblock: Win32.PVOID;
  36.                      size    : Win32.Strings.size_t)
  37.                                return Win32.PVOID;          -- malloc.h:77
  38.  
  39.     function alloca(size: Win32.Strings.size_t) 
  40.         return Win32.PVOID;                                 -- malloc.h:80
  41.  
  42.     function expand(memblock: Win32.PVOID;
  43.                     size    : Win32.Strings.size_t)
  44.                               return Win32.PVOID;           -- malloc.h:81
  45.  
  46.     function heapchk return Win32.INT;                      -- malloc.h:82
  47.  
  48.     function heapmin return Win32.INT;                      -- malloc.h:83
  49.  
  50.     function heapset(fill: Win32.UINT) return Win32.INT;    -- malloc.h:84
  51.  
  52.     function heapwalk(entryinfo: access HEAPINFO) return Win32.INT;
  53.                                                             -- malloc.h:85
  54.  
  55.     function msize(memblock: Win32.PVOID) return Win32.Strings.size_t;
  56.                                                             -- malloc.h:86
  57.  
  58. private
  59.  
  60.     pragma Convention(C, HEAPINFO);                         -- malloc.h:64
  61.  
  62.     pragma Import(C, calloc, "calloc");                     -- malloc.h:74
  63.     pragma Import(C, free, "free");                         -- malloc.h:75
  64.     pragma Import(C, malloc, "malloc");                     -- malloc.h:76
  65.     pragma Import(C, realloc, "realloc");                   -- malloc.h:77
  66.     pragma Import(C, alloca, "_alloca");                    -- malloc.h:80
  67.     pragma Import(C, expand, "_expand");                    -- malloc.h:81
  68.     pragma Import(C, heapchk, "_heapchk");                  -- malloc.h:82
  69.     pragma Import(C, heapmin, "_heapmin");                  -- malloc.h:83
  70.     pragma Import(C, heapset, "_heapset");                  -- malloc.h:84
  71.     pragma Import(C, heapwalk, "_heapwalk");                -- malloc.h:85
  72.     pragma Import(C, msize, "_msize");                      -- malloc.h:86
  73.  
  74. -------------------------------------------------------------------------------
  75. --
  76. -- THIS FILE AND ANY ASSOCIATED DOCUMENTATION IS PROVIDED WITHOUT CHARGE
  77. -- "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
  78. -- BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
  79. -- FITNESS FOR A PARTICULAR PURPOSE.  The user assumes the entire risk as to
  80. -- the accuracy and the use of this file.  This file may be used, copied,
  81. -- modified and distributed only by licensees of Microsoft Corporation's
  82. -- WIN32 Software Development Kit in accordance with the terms of the 
  83. -- licensee's End-User License Agreement for Microsoft Software for the
  84. -- WIN32 Development Kit.
  85. --
  86. -- Copyright (c) Intermetrics, Inc. 1995
  87. -- Portions (c) 1985-1994 Microsoft Corporation with permission.
  88. -- Microsoft is a registered trademark and Windows and Windows NT are
  89. -- trademarks of Microsoft Corporation.
  90. --
  91. -------------------------------------------------------------------------------
  92.  
  93. end Win32.Malloc;
  94.