Out of Memory

36 views
Skip to first unread message

陳冠榮

unread,
Oct 24, 2021, 2:27:32 AM10/24/21
to Glowscript Users
I'm working on the code written by Bruce Sherwood below:
It runs properly. But I find that the memory usage keeps increasing, and finally the page shows the message: Out of Memory.
Here are two questions:
1.Why does the memory used keep increasing?
2.Which part of the code causes the result?

Thanks.
CKJ

Bruce Sherwood

unread,
Oct 24, 2021, 4:11:20 PM10/24/21
to Glowscript Users
I ran your version of my program on both Windows Chrome and Mac Safari and I don't see any memory leak. What platform do you use? What browser do you use?

Bruce

Message has been deleted

陳冠榮

unread,
Oct 24, 2021, 10:09:24 PM10/24/21
to Glowscript Users
OS: Windows 10
browser:  Google Chrome 95.0.4638.54

The following is a snapshot of the task manager.

test.jpg
CKJ

Bruce Sherwood 在 2021年10月25日 星期一上午4:11:20 [UTC+8] 的信中寫道:

Bruce Sherwood

unread,
Oct 25, 2021, 2:57:41 PM10/25/21
to Glowscript Users
Okay, I re-did my measurements to look at just the browser time, rather than overall memory usage, and I do see the memory rise. However, there is no memory rise when I run my original program, so it's due to some change you've made. I suggest that you start again from my program and make your memory test after each change that you make, in order to identify in what way you are constantly increasing the memory usage (presumably by creating more and more objects).

Bruce

陳冠榮

unread,
Oct 25, 2021, 11:09:37 PM10/25/21
to Glowscript Users
I see. I will try.
Thanks.
CKJ

Bruce Sherwood 在 2021年10月26日 星期二上午2:57:41 [UTC+8] 的信中寫道:

陳冠榮

unread,
Oct 29, 2021, 2:34:51 AM10/29/21
to Glowscript Users
I found that the same codes had different outcomes. I copied the codes of one page and pasted them to another page. The former ran normally, while the latter got 'Out-of-Memory' outcome. It seems like that the problem is something related to OS or browser, but not the codes. It's out of my ability to figure out what's going on, so I have to quit.
Thanks.

CKJ
陳冠榮 在 2021年10月26日 星期二上午11:09:37 [UTC+8] 的信中寫道:
Reply all
Reply to author
Forward
0 new messages