[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65240] The byte-code interpreter gets out of
From: |
Hendrik K |
Subject: |
[Octave-bug-tracker] [bug #65240] The byte-code interpreter gets out of sync and does not release memory in certain cases |
Date: |
Fri, 2 Feb 2024 04:42:52 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?65240>
Summary: The byte-code interpreter gets out of sync and does
not release memory in certain cases
Group: GNU Octave
Submitter: koerhen
Submitted: Fri 02 Feb 2024 09:42:52 AM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: GNU/Linux
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Fri 02 Feb 2024 09:42:52 AM UTC By: Hendrik K <koerhen>
The byte-code interpreter seems to get out of sync in certain cases and it
appears that the memory of local variables (after exiting the function) is not
released.
Branch: bytecode-interpreter
Hg-id: 3904d7116c8c
(Note: The issue was originally detected with an older self-build version of
octave but I included the newest commits to confirm that the issue still
exists).
With the byte code interpreter disabled, everything works fine:
_vm_enable__(0)
octave:3> test1()
Available system memory: 55642.79 MB
Available system memory: 55646.98 MB
Available system memory: 55650.52 MB
Available system memory: 55650.41 MB
Available system memory: 55650.05 MB
Available system memory: 55655.12 MB
Available system memory: 55654.53 MB
Available system memory: 55654.67 MB
Available system memory: 55654.81 MB
Available system memory: 55658.27 MB
2.4142
With the byte-code interpreter enabled, memory does not get released.
__vm_enable__(1)
octave:3> test1()
Available system memory: 55768.84 MB
Available system memory: 55571.18 MB
Available system memory: 55377.36 MB
Available system memory: 55186.26 MB
Available system memory: 54995.40 MB
Available system memory: 54804.04 MB
Available system memory: 54608.75 MB
Available system memory: 54417.39 MB
Available system memory: 54226.53 MB
Available system memory: 54035.18 MB
2.4142
Test program test1.m
1;
function [a1,a2] = Do_Unique(a)
[~, i_idx] = unique(a, "first");
a1 = a(i_idx);
a2 = sqrt(a1);
endfunction
function [retval] = OptFun(x)
[~, refresh] = Do_Unique([1,2,1,1]);
t_data = zeros(5000) .* x;
retval = sum(refresh);
endfunction
for i=1:10
a = OptFun(i);
[~, sd] = memory(); printf("Available system memory: %7.2f
MB\n",sd.SystemMemory.Available./1024./1024);
endfor
disp(a);
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65240>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #65240] The byte-code interpreter gets out of sync and does not release memory in certain cases,
Hendrik K <=