menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class Heap - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class Heap

    This class contains native heap functions.

    Inheritance
    System.Object
    Heap
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.XlsIO.Implementation
    Assembly: Syncfusion.XlsIO.Base.dll
    Syntax
    public sealed class Heap

    Constructors

    Heap()

    Declaration
    public Heap()

    Methods

    HeapAlloc(IntPtr, Int32, Int32)

    This function allocates a block of memory from a heap. The allocated memory is not movable.

    Declaration
    public static IntPtr HeapAlloc(IntPtr hHeap, int dwFlags, int dwBytes)
    Parameters
    Type Name Description
    System.IntPtr hHeap

    Handle to the heap from which the memory will be allocated.

    System.Int32 dwFlags

    Heap allocation options.

    System.Int32 dwBytes

    Number of bytes to be allocated. If the heap specified by the hHeap parameter is a nongrowable heap, dwBytes must be less than 0x7FFF8. You create a nongrowable heap by calling the HeapCreate function with a nonzero value.

    Returns
    Type
    System.IntPtr

    HeapCreate(Int32, Int32, Int32)

    Creates a heap object that can be used by the calling process. The function reserves space in the virtual address space of the process and allocates physical storage for a specified initial portion of this block.

    Declaration
    public static IntPtr HeapCreate(int flOptions, int dwInitialSize, int dwMaximumSize)
    Parameters
    Type Name Description
    System.Int32 flOptions

    The heap allocation options.

    System.Int32 dwInitialSize

    The initial size of the heap, in bytes. This value determines the initial amount of memory that is committed for the heap. The value is rounded up to the next page boundary. The value must be smaller than dwMaximumSize. If this parameter is 0, the function commits one page.

    System.Int32 dwMaximumSize

    The maximum size of the heap, in bytes.

    Returns
    Type
    System.IntPtr

    HeapDestroy(IntPtr)

    Destroys the specified heap object. It decommits and releases all the pages of a private heap object, and it invalidates the handle to the heap.

    Declaration
    public static int HeapDestroy(IntPtr hHeap)
    Parameters
    Type Name Description
    System.IntPtr hHeap

    A handle to the heap to be destroyed.

    Returns
    Type Description
    System.Int32

    If the function succeeds, the return value is nonzero.

    HeapFree(IntPtr, Int32, IntPtr)

    Frees a memory block allocated from a heap by the HeapAlloc or HeapReAlloc function.

    Declaration
    public static int HeapFree(IntPtr hHeap, int dwFlags, IntPtr lpMem)
    Parameters
    Type Name Description
    System.IntPtr hHeap

    A handle to the heap whose memory block is to be freed.

    System.Int32 dwFlags

    The heap free options.

    System.IntPtr lpMem

    A pointer to the memory block to be freed.

    Returns
    Type Description
    System.Int32

    If the function succeeds, the return value is nonzero.

    HeapReAlloc(IntPtr, Int32, IntPtr, Int32)

    Reallocates a block of memory from a heap. This function enables you to resize a memory block and change other memory block properties. The allocated memory is not movable.

    Declaration
    public static IntPtr HeapReAlloc(IntPtr hHeap, int dwFlags, IntPtr lpMem, int dwBytes)
    Parameters
    Type Name Description
    System.IntPtr hHeap

    A handle to the heap from which the memory is to be reallocated.

    System.Int32 dwFlags

    The heap reallocation options.

    System.IntPtr lpMem

    A pointer to the block of memory that the function reallocates.

    System.Int32 dwBytes

    The new size of the memory block, in bytes. A memory block's size can be increased or decreased by using this function.

    Returns
    Type Description
    System.IntPtr

    If the function succeeds, the return value is a pointer to the reallocated memory block.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved