Unless the memory calls have changed, the "raw pointers" was something I
implemented 5+ years ago when I submitted a patch to transition away from
temporary files.
The design goal I had in mind was speed, to keep the implementation portable,
and to make the memory buffers agnostic to the data. Speed was important to me
because I was using plplot to display data real time. I implemented a simple
"double the memory buffer" when the buffer got full.
I thought about a making the code smarter about memory management, but I
decided that the compiler and OS would suffice and the benefit was (what I
thought) simpler code. I did not want to play whack-a-mole fixing memory
allocation bugs.
That said, tools have gotten better and a fresh look is a good idea.
> On Sep 22, 2014, at 10:17 AM, Phil Rosenberg <philip_rosenb...@yahoo.com>
> wrote:
>
> This one is mostly directed at Alan but probably others will be interested
> and may have comments. Git might also be a big help here, but I'm not sure
> how it will work so advice from all appreciated.
>
> I have been trying to improve memory management in plplot as part of my
> attempt to try to remove exit calls. To do this I am removing raw pointer
> arrays and replacing them with a struct which will give us more object
> oriented access to memory allocation. I think this will be a generally good
> thing as the struct can have function pointers which will allow trivial
> resizing and adding elements. It will also be extendible, to allow further
> functionality similar to std::vector if we want. Arrays will also know their
> own size.
>
> However the cost is that arrays in the plstream will all become structs so
> will need accessing by somearray.mem[index] or maybe
> somearray.getMem()[index] rather than somearray[index]. This has the
> potential to break some or all the drivers. Although the fixes might be
> trivial, I don't have easy access to all the drivers on my windows machine.
>
> I'm therefore looking for a suggestion of how to proceed. I can transfer
> stuff to my Linux machine, but I'm not sure how best to do that with git. I
> could create a fork on github so other developers can contribute, but if I
> create a public fork then we should merge that into the master branch rather
> than rebase it which I think is not compliant with our current workflow.
>
> Any suggestions greatly appreciated.
>
> Phil
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> Plplot-devel mailing list
> Plplot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/plplot-devel
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel