Menu

#282 Preset index table size and depth to prevent memory fragmentation

2.0.2.0
closed
None
2019-10-21
2019-10-10
Bernd Löhr
No

In a multi-client environment, succesive calls to tlc_updateSession() can lead to memory fragmentation during the initialisation phase. To avoid this, memory for the index tables should be allocated beforehand based on the overall expected number of telegrams.
There are several ways to pass these additional configuration values to the stack:

  1. Extending the memConfig struct given to tlc_init(); this would need minor modifications in the API, only.
  2. An additional call tlc_configIndexTablesMem() with the maximum number of comIds for ingress/egress...
  3. Compile-time specified for HIGH_PERF_INDEXED only

Discussion

  • Bernd Löhr

    Bernd Löhr - 2019-10-11
    • status: open --> accepted
     
  • Bernd Löhr

    Bernd Löhr - 2019-10-11

    Because indexing concerns telegram count , which is related to interfaces (app sessions), point 1. is not a good idea and point 3 is too static. Thus: An additional API call will be used.

     
  • Bernd Löhr

    Bernd Löhr - 2019-10-18
    • status: accepted --> pending
     
  • Bernd Löhr

    Bernd Löhr - 2019-10-18

    Additional configuration call has been added:
    TRDP_ERR_T tlc_presetIndexSession (
    TRDP_APP_SESSION_T appHandle,
    TRDP_IDX_TABLE_T *pIndexTableSizes);

     
  • Bernd Löhr

    Bernd Löhr - 2019-10-21
    • Status: pending --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB