# Memory Allocation Issue?

**URL:** <https://forum.opentap.io/t/memory-allocation-issue/918>\
**Category:** General\
**Created:** [November 1, 2022, 10:27pm UTC](https://forum.opentap.io/t/memory-allocation-issue/918 "2022-11-01T22:27:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![craig.petku](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@craig.petku](https://forum.opentap.io/u/craig.petku)\
**Post date:** [November 1, 2022, 10:27pm UTC](https://forum.opentap.io/t/memory-allocation-issue/918/1 "2022-11-01T22:27:22Z")

</div>

Any comments on what this means or a pointer to a tutorial which might help advance my understanding of how to debug a test sequence that seems to keep growing in memory.?

This is 9.18.4 (I’ll upgrade if necessary). What’s unique about this sequence is it has nested parameter sweeps and parallel threads. I’ve looked through my source for a memory leak but can’t find any…

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opentap/original/1X/cdeeb1401a4bccdc3bbbe5c2b03318de48cb1f0a.png)

---

<div class="post-metadata">

**Author:** ![craig.petku](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@craig.petku](https://forum.opentap.io/u/craig.petku)\
**Post date:** [November 1, 2022, 11:43pm UTC](https://forum.opentap.io/t/memory-allocation-issue/918/2 "2022-11-01T23:43:19Z")

</div>

I’m guessing the sweep steps have an unwanted behavior…

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opentap/original/1X/31afbbcc36f322c0622da828e578497c453b1e73.jpeg)

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [November 2, 2022, 12:04pm UTC](https://forum.opentap.io/t/memory-allocation-issue/918/3 "2022-11-02T12:04:34Z")

</div>

Hi @craig.petku,

I can reproduce this and have added [a new issue](https://github.com/opentap/opentap/issues/904).

I think this warrants a 9.19.4 release of OpenTAP, but until then you should be able to remove {Parameters} from your Sweep steps name and that should fix the issue as well.

---

<div class="post-metadata">

**Author:** ![craig.petku](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@craig.petku](https://forum.opentap.io/u/craig.petku)\
**Post date:** [November 2, 2022, 2:28pm UTC](https://forum.opentap.io/t/memory-allocation-issue/918/4 "2022-11-02T14:28:04Z")

</div>

Thank you. I confirmed deleting the {Parameters} from the step name significantly reduced memory useage although the stack for the application continues to grow (at a slower rate). The objects which are accumulating still appear to be related to the sweep step, but the overall runtime for this stress test should be greatly increased by your recommendation.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opentap/original/1X/5c95a3e3367f194a2cda2e848edbec516fea2ef7.png)

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [November 2, 2022, 3:54pm UTC](https://forum.opentap.io/t/memory-allocation-issue/918/5 "2022-11-02T15:54:13Z")

</div>

Maybe you could try this build? [904 ParameterizeStep Memory Leak by rmadsen-ks · Pull Request #905 · opentap/opentap · GitHub](https://github.com/opentap/opentap/pull/905)

It should fix the issue, but if there is other issues, it would be nice to understand it.

---

<div class="post-metadata">

**Author:** ![craig.petku](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@craig.petku](https://forum.opentap.io/u/craig.petku)\
**Post date:** [November 2, 2022, 8:02pm UTC](https://forum.opentap.io/t/memory-allocation-issue/918/6 "2022-11-02T20:02:11Z")

</div>

I assume I need to compile this. Just to verify, is there a pre-built package?

---

<div class="post-metadata">

**Author:** ![brennen\_direnzo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/brennen_direnzo/32/6_2.png) [@brennen\_direnzo](https://forum.opentap.io/u/brennen_direnzo)\
**Post date:** [November 2, 2022, 8:20pm UTC](https://forum.opentap.io/t/memory-allocation-issue/918/7 "2022-11-02T20:20:04Z")

</div>

You should be able to install the package from here:  
[https://github.com/opentap/opentap/suites/9088931453/artifacts/421107288](https://github.com/opentap/opentap/suites/9088931453/artifacts/421107288)

---

<div class="post-metadata">

**Author:** ![craig.petku](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@craig.petku](https://forum.opentap.io/u/craig.petku)\
**Post date:** [November 2, 2022, 8:23pm UTC](https://forum.opentap.io/t/memory-allocation-issue/918/8 "2022-11-02T20:23:42Z")

</div>

Thank you,

I built it anyway since it was a quick resync with the server. this fixes the issue I was having and now memory growth is mainly the console log at a much more acceptable rate. Screen shot included to document the issue was resolved.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opentap/original/1X/9d54409675c25ef29f77ccebfd1d750670954c1c.png)

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [November 2, 2022, 9:05pm UTC](https://forum.opentap.io/t/memory-allocation-issue/918/9 "2022-11-02T21:05:49Z")

</div>

OK, thanks for verifying it! This will help towards getting it into a release quicker.
