Open topic with navigation

# KVMemoryStream

This structure defines an optional memory allocator to be used by XML Export. It is initialized by calling `fpInit()`. See fpInit().

    typedef struct tag_MemoryStream
    {
      void   *pMemoryStreamPrivateData;
      void * (pascal *fpMalloc)(struct tag_MemoryStream*,size_t);
      void   (pascal *fpFree) (struct tag_MemoryStream*, void *);
      void * (pascal *fpRealloc)(struct tag_MemoryStream*,void *, size_t);
      void * (pascal *fpCalloc)(struct tag_MemoryStream*, size_t, size_t);
    }
    KVMemoryStream;

## Member Descriptions

All member functions are equivalent to their counterparts in the ANSI standard library.

## Discussion

- `fpRealloc()` must handle a `NULL` pointer.

- For systems that do not support `fpRealloc()`, refer to the `callback` sample program, which demonstrates how to use the memory management features.

- If `KVMemoryStream` is not provided, the default C run-time memory allocation is used.

© Copyright 2006-2019 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm