avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mauri Tikka <ma...@machina.fi>
Subject C dynamic memory, howto contribute
Date Sat, 06 Sep 2014 09:31:52 GMT
Hi,

I thought of implementing a dynamic allocation memory IO for the AVRO C
library.

has this already been done, btw? I've used 1.7.7 and I did not see this
in JIRA. There was a mail discussion from a few years back, but I guess
it did not proceed.

I thought of doing it like this:

- library manages memory allocation internally (no buffer passed on
writer/reader initialisation)
- 2 parameters guide allocation for writer: initial buffer size and
buffer increment size
- parameters are global variables with default values, which can be changed
- doubling of current buffer size would be another option. Opinions on this?
- I guess I need to create a new IO type AVRO_MEMORY_DYNAMIC_IO
- writer functions do have checks for overrunning the buffer. I would
replace thos checks
by first checking, if we use the dynamic IO, and if yes, then I would
call a buffer expansion routine before continuing.

Maximum size to buffer is not necessary, because using the library
provided memory allocation function gives the possibility, if wanted, to
limit the total memory allocation.

Would I need to mimic the interface from another language library? Is
this relevant/has this been done for another language, and should I copy
those interfaces or their structure?

I have ample background in coding and architecture, but haven't
contributed to open source as of yet. I did read the Apache policy about
this.

best regards
Mauri Tikka
mauri@machina.fi
+358 50 555 5755

-- 
Machina Ludens
Iltapäiväntie 5 B
FIN-02210 ESPOO
+358 50 5555 755
mauri@machina.fi
www.machina.fi <http://machina.fi/>
Y 1663073-6
FI20 4405 0010 1018 90 /HELSFIHH
© 2011 Machina Ludens

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message