mlock bug
Ben Abbott
bpabbott at mac.com
Sun Feb 17 09:56:47 CST 2008
On Feb 17, 2008, at 9:13 AM, Ben Abbott wrote:
>
> On Feb 17, 2008, at 6:51 AM, Sergei Steshenko wrote:
>
>>
>> --- Ben Abbott <bpabbott at mac.com> wrote:
>>
>>> "mlock" appears to not function for my installation.
>>>
>>> ---------------------------
>>> function y = test_mlock (x)
>>> persistent s = 0
>>> mlock;
>>> if (nargin > 0)
>>> s = x;
>>> endif
>>> y = s;
>>> endfunction
>>> ---------------------------
>>>
>>> octave:1> test_mlock
>>> ans = 0
>>> octave:2> test_mlock(1)
>>> ans = 1
>>> octave:3> test_mlock
>>> ans = 1
>>> octave:4> clear all
>>> octave:5> test_mlock
>>> ans = 0
>>> octave:6> ver
>>> ----------------------------------------------------------------------
>>> GNU Octave Version 3.0.0+
>>> GNU Octave License: GNU General Public License
>>> Operating System: Darwin 9.2.0 Darwin Kernel Version 9.2.0: Tue
>>> Feb 5
>>> 16:13:22 PST 2008; root:xnu-1228.3.13~1/RELEASE_I386 i386
>>> ----------------------------------------------------------------------
>>>
>>> Should not the answer to line 5 still be "1"?
>>>
>>> Ben> _______________________________________________
>>> Bug-octave mailing list
>>> Bug-octave at octave.org
>>> https://www.cae.wisc.edu/mailman/listinfo/bug-octave
>>>
>>
>> In my case it appears to work:
>>
>> "
>> octave:1> function y = test_mlock (x)
>>> persistent s = 0
>>> mlock;
>>> if (nargin > 0)
>>> s = x;
>>> endif
>>> y = s;
>>> endfunction
>> octave:2> test_mlock
>> ans = 0
>> octave:3> test_mlock(1)
>> ans = 1
>> octave:4> test_mlock
>> ans = 1
>> octave:5> clear all
>> octave:6> test_mlock
>> ans = 1
>> octave:7> ver
>> ----------------------------------------------------------------------
>> GNU Octave Version 3.0.0
>> GNU Octave License: GNU General Public License
>> Operating System: Linux 2.6.18.8-0.9-default #1 SMP Sun Feb 10
>> 22:48:05 UTC 2008 i686
>> ----------------------------------------------------------------------
>> octave:8>
>> ".
>>
>> Regards,
>> Sergei.
>
> ok ... my 3.0.0+ on Darwin-386i doesn't work, but 3.0.0 on Linux does.
>
> I checked 3.0.0 on Darwin-PPC and it worked as well.
>
> I'll try building the latest sources on my Intel mac and see what
> happens.
>
> Ben
The most recent snap shot failed to build on my mac.
If anyone is looking to kill a few minutes of time, I've attached my
test script.
For the inclined, type "test test_mlock" at the command prompt. If it
works, you'll get something similar to that below (the last test
simple runs "ver").
octave:12> test test_mlock
y = 0
y = 1
y = 1
y = 1
----------------------------------------------------------------------
GNU Octave Version 3.0.0
GNU Octave License: GNU General Public License
Operating System: Darwin 9.2.0 Darwin Kernel Version 9.2.0: Tue Feb 5
16:15:19 PST 2008; root:xnu-1228.3.13~1/RELEASE_PPC Power Macintosh
----------------------------------------------------------------------
PASSES 5 out of 5 tests
Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080217/00af9f30/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_mlock.m
Type: application/octet-stream
Size: 326 bytes
Desc: not available
Url : https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080217/00af9f30/attachment.obj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080217/00af9f30/attachment-0001.html
More information about the Bug-octave
mailing list