re question 1:
Can you duplicate the problem outside the complexity of your application?
That is, can you get the verb sketched out below fail?
test=: 3 : 0
for. i.100 do.
create jmf file
map the file
unmap the file
delete the file
end.
)
How often does it fail? J32 or J64? Windows or Linux?
It would be interesting to see the data at the beginning of a jmf file that
fails. That is, something like:
a.i. fread jmf_file
On Mon, Sep 15, 2008 at 10:50 AM, <[EMAIL PROTECTED]> wrote:
> This repeats my previous message with the newlines relocated
> to make it look better and with a couple of errors in the example
> corrected. My apologies for any inconvenience!
>
> I have two questions. First, I am trying to create and map some
> files under program control using the jmf utilities. Sometimes
> when I create a jmf file and then try to map it to a variable name
> I get a "bad jmf header" error message. When I try the map_jmf_
> operation manually rather than in the program, but using the jmf file
> created by the program, it also gives the "bad jmf header" message.
> But if I create the jmf file manually and then map it manually, it
> works. So the problem seems to have something to do with the
> create_jmf_ step.
>
> My second question involves using 7!:5 to estimate the file size
> necessary for the mapped file to hold a particular boxed array.
> (There is no problem with numeric or character arrays as I can just
> multiply their number of elements by JINT, JFL, JCHAR, etc.). I
> hope the figures given by 7!:5 will be sufficient to avoid allocation
> errors, but I am puzzled by behavior like the following:
>
>
> (1200$<a.)-:1200$<256{.a.
> 1
> (1200$<' ')-:1200$<32{a.
> 1
> (1200$<' ')-:1200$<32{a.
> 1
> 7!:5 <'x'
> 8192
> x=.1200$<256$a.
> 7!:5 <'x'
> 622592
> x=.1200$<256{.a.
> 7!:5 <'x'
> 622592
> x=.1200$<128$a.
> 7!:5 <'x'
> 315392
> x=.1200$<' '
> 7!:5 <'x'
> 8192
> x=.1200$<32{a.
> 7!:5 <'x'
> 84992
> x=.1200$' ' NB. Unboxed
> 7!:5 <'x'
> 2048
>
> etc.
>
> Granted that boxed arrays can sometimes require much more space than
> unboxed arrays, it does seem strange that the size required should
> depend on how the arrays were originally constructed, before being
> assigned to a noun.
>
> Dick Vaughan
>
>
> This message is intended only for the addressee and may contain information
> that is confidential or privileged. Unauthorized use is strictly prohibited
> and may be unlawful. If you are not the intended recipient, or the person
> responsible for delivering to the intended recipient, you should not read,
> copy, disclose or otherwise use this message, except for the purpose of
> delivery to the addressee. If you have received this email in error, please
> delete and advise the IT Security department at [EMAIL PROTECTED]
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm