Skip to content

Conversation

n-isaka
Copy link
Member

@n-isaka n-isaka commented Aug 1, 2025

CANCEL ALL実行時に内部で持っているプログラムスタック用のメモリが開放されないため、多くのプログラムを繰り返し実行すると、メモリ使用量とCANCEL処理完了までの時間が増大する不具合が見つかった。

このため、CANCEL ALLが実行されるたびに対象のスタックリストをクリアするように修正した。


When CANCEL ALL is executed, the memory used for the program stack is not released internally, so when many programs are executed repeatedly, a problem was found where memory usage and the time required to complete the CANCEL process increased.

Therefore, we have made a fix so that the target stack list is cleared each time CANCEL ALL is executed.

* Fixed the program stack list to be initialized every time CANCEL ALL is executed.
Copy link

@GitMensch GitMensch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
You may want to check for more issues (outside this PRs scope) using valgrind's memcheck.

libcob/call.c Outdated
Comment on lines 300 to 301
new_list->name = malloc (strlen (name) + 1);
strcpy (new_list->name, name);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use strdup directly?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I updated it.

@n-isaka n-isaka merged commit 5dd19d9 into opensourcecobol:develop Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants