Stuff like https://github.com/jsoftware/jsource/blob/master/jsrc/cc.c#L366 ?

Thanks,

-- 
Raul

On Tue, Dec 8, 2020 at 11:42 AM Henry Rich <[email protected]> wrote:
>
> Don't even think about fooling with J memory blocks.  Use mema, memr,
> memw, memf, memu.  Anything else will crash.
>
> Henry Rich
>
> On 12/8/2020 11:37 AM, Raul Miller wrote:
> > I would classify that as possible, but maybe not in the way that you
> > are envisioning.
> >
> > (1) There's a header that J's array mechanism would need in front of
> > that string (in older versions of J -- the newer versions support
> > aliasing into arrays, but require a J array to alias -- I haven't
> > studied enough to see if there's any way to weasel out of that issue,
> > but if there is it would obviously have version dependencies), and
> >
> > (2) The details of the implementation would be version dependent and
> > would have to be approached from the C side in any current version of
> > J (because the relevant data structures are not exposed to the J
> > environment).
> >
> > But the primitives are necessarily supported, on the C side (since J
> > is implemented in C).
> >
> > I am guessing that you have some context where you have some other
> > codebase doing memory allocation and you think it would be worthwhile
> > manipulating that memory directly from J but also feel that the
> > overhead of creating a fresh copy is too high?
> >
> > It's probably worth noting here that most J operations make copies of
> > memory during their operation (except in carefully restricted cases).
> >
>
>
> --
> This email has been checked for viruses by AVG.
> https://www.avg.com
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to