patchGNU Octave - Patches: patch #9276, decide between array slice...

 
 

patch #9276: decide between array slice references and copies based on size

Submitted by:  Olaf Till <i7tiol>
Submitted on:  Thu 02 Mar 2017 08:12:57 PM UTC  
 
Category:  Core : other Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 02 Mar 2017 08:12:57 PM UTC, original submission:

Patched revision: default, 2bed6d6bb2e2, 2017-02-24 20:43+0100

Problem: with current array slice references, large arrays remain in memory even if only a reference to a small part of them still exists.

Demonstration (in single user mode, swapping switched off):

However, contrary to what I initially thought, no problem if array allocated within function:
so if I had to decide now, I probably wouldn't apply the patch.

With patch, demonstrated problem is fixed:

Description of patch:

If slice reference leaves a certain proportion (configurable, default 50 percent) of array unreferenced, and this proportion corresponds to more than getpagesize(), a copy is made instead of a reference. The same configure option, set to 'no' or '0', disables slice references entirely. Set to '100' for behaviour of unpatched Octave.

Make check gives:

Summary:

PASS 15008
FAIL 20
XFAIL 38
SKIPPED 204

with unpatched as well as with patched version, the latter both with slice references enabled and disabled.

No test for patched behaviour can be supplied, since only feasible in single user mode and without swapping.

Olaf Till <i7tiol>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #39882:  array-slice-refs-or-copies.cset added by i7tiol (6KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by i7tiol (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-03-02 i7tiol Attached File- => Added array-slice-refs-or-copies.cset, #39882

    Back to the top


    Powered by Savane 3.3