WMX3 User Manual Logo

Documentation

  • Release Notes
  • Support Specifications
  • Setup Guide
  • General Programming Guideline
    • Architecture
    • Tutorial
    • Supplemental Information
    • Function Calls with Specific Properties
      • Function Calls Affected by Interrupts
      • Function Calls That Are Blocking
      • Function Calls for Special Processing
      • Function Calls Related to Memory Allocation
  • Motion Programming Guideline
  • Simulator Platform
  • EtherCAT Platform

API Reference

  • WMX3 APIs
WMX3 User Manual
  • General Programming Guideline
  • Function Calls with Specific Properties
  • Function Calls Related to Memory Allocation

Function Calls Related to Memory Allocation

Consideration for memory allocation is of utmost importance to mission critical applications. If memory is frequently allocated dynamically, it is possible that the system suddenly is unable to perform an operation after running for an extended period due to running out of memory, fragmentation of memory, or memory leaks.

As such, all memory should be allocated during initialization of the user application, and memory should neither be allocated or freed during operation.

The WMX3 library contains several functions that allocate memory dynamically. This is to allow flexibility in memory use (for example, up to 2GB of memory can be allocated to execute a single spline command). All of the functions that allocate memory dynamically are able to do so during the initialization of the user application. However, the user must be careful to actually call these functions during initialization, and not during operation.

Other than these, the WMX3 engine will not dynamically allocate or free memory during operation.

The following functions allocate memory dynamically.

  • WMX3Api::CreateDevice - See Devices.

  • ApiBuffer::CreateApiBuffer - See Opening an API Buffer Channel.

  • Log::SetLog - See Memory Usage.

  • Log::OpenMemoryLogBuffer

  • Log::SetApiLog

  • EventControl::SetEvent - See Memory Usage.

  • AdvMotion::CreateSplineBuffer - See Overview.

  • Motion::CreatePVTBuffer - See Overview.

  • AdvMotion::CreatePathIntplBuffer - See Overview.

  • AdvMotion::CreatePathIntplWithRotationBuffer - See Overview.

  • AdvMotion::CreatePathIntplLookaheadBuffer - See Overview.

  • CyclicBuffer::OpenCyclicBuffer

The following functions free memory dynamically.

  • WMX3Api::CloseDevice

  • ApiBuffer::FreeApiBuffer

  • Log::CloseMemoryLogBuffer

  • Log::SetApiLog (both allocates and frees memory)

  • AdvMotion::FreeSplineBuffer

  • Motion::FreePVTBuffer

  • AdvMotion::FreePathIntplBuffer

  • AdvMotion::FreePathIntplWithRotationBuffer

  • AdvMotion::FreePathIntplLookaheadBuffer

  • CyclicBuffer::CloseCyclicBuffer

Previous Next

© Copyright 2024, MOVENSYS Inc. (Built by Kyoungje Oh). Last updated on Jul 07, 2024, 11:11:55 PM.

Built with Sphinx using a theme provided by Read the Docs.