too much slow!! El sábado, 1 de septiembre de 2012 19:09:17 UTC+2, Seiji Sam Lee escribió: > > Right! great argument, but .... > > I have done a buffer with a hidden realloc, it born with size zero and > realloc when it is needed. There aren't a exlicit realloc method. Would be > util for the community? > > > El viernes, 31 de agosto de 2012 19:23:16 UTC+2, codepilot Account > escribió: >> >> Buffers can in a way be resized, use slice to make smaller, and concat to >> make bigger. I doubt slice frees anything, but concat does allocate if it >> needs to. >> >> On Thu, Aug 30, 2012 at 2:48 PM, Ben Noordhuis <in...@bnoordhuis.nl>wrote: >> >>> On Thu, Aug 30, 2012 at 11:12 PM, Seiji Sam Lee <seiji...@gmail.com> >>> wrote: >>> > Apologize if this is a old-issue but, why Buffer has its size static? >>> > >>> > Why don't use realloc to resize its capacity? >>> >>> Because bad things would happen if the code below was legal: >>> >>> var buf = new Buffer(1024); >>> fs.read(fd, buf, buf.length, cb); >>> buf.resize(32); >>> >>> -- >>> Job Board: http://jobs.nodejs.org/ >>> Posting guidelines: >>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >>> You received this message because you are subscribed to the Google >>> Groups "nodejs" group. >>> To post to this group, send email to nod...@googlegroups.com >>> To unsubscribe from this group, send email to >>> nodejs+un...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/nodejs?hl=en?hl=en >>> >> >>
-- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en