KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ How does nested columns/lists fragment memory? Re: How does nested columns/lists fragment memory?

  • lzl

    Member
    June 13, 2023 at 12:00 am

    Hi Sam,

    Thanks for your detailed explanation and documents. I have tried the Immediate garbage collection mode in my application but didn’t get much speed up. I create nested list (mixed with different datatypes) and may release part of it in my function.  And I have some further questions:

    1. Will creating temporary nested list within a function and update them locally (without updating to global variables) cause memory fragmentation? For example: I first create a nested list nl and then reassign nl:nl[:: ; 0]
    2. If I reassign  nl: nl[:: ; 0] and also update nl to a global variable `.test.nl insert nl, will it cause memory fragmentation?
    3. In which scenario will variable declaration operation (:) cause memory allocation in KDB?