"implementation of `malloc'" because I have not the time to test/check the original malloc.c code in glibc. Linux uses `mremap' to reallocate large blocks, perhaps the answer is there but I'm not sure without a test/reading. I have followed my instinct for the first solution and the reason for the second. I have written > Note: `tmp = instrument+1' causes segfault on arch-32bit, so the offset is >=2. therefore your third solution in git instr = (INSTR*)realloc(instr, (instrument+1)*sizeof(INSTR)); fails (segfault) on arch-32bit with ; by Brian Baughn 3-14-05 ; bbaughn@berklee.net beats = 100 permeasure = 4 i101 m1 b1 q mp D3 i101 F3 i101 D3 i101 m2 b1 D3 i101 b3 D3 i101 m3 b1 D3 i101 F3 i101 D3 i101 m4 b1 D3 i101 b3 D3 i101 m5 b1 D3 i101 b4 G5 i101 m6 b1 E5 i101 b2 F5 i101 b3 e Eb5 i101 b3.5 e i101 b4 q i101 m7 b1 e D5 i101 i101 q i101 e Db5 i101 i101 q i101 m8 b1 q D5 i101 E5 i101 D5 i102 m1 b2 q D4 i102 b4 E4 i102 b4 Bb3 i102 m2 b2 F4 i102 b2 B3 i102 b4 C#4 i102 b4 Bb3 i102 m3 b2 q D4 i102 b4 E4 i102 b4 Bb3 i102 m4 b2 F4 i102 b2 B3 i102 b4 C#4 i102 b4 Bb3 i103 m5 b2 e F6 i103 b2 e A5 i103 b2.5 e D6 i103 b3 e F6 i103 b3 e A5 i103 b4 e E6 i103 m6 b1 q C#6 i103 q D6 i103 e C6 i103 i103 q i103 m7 b1 e B5 i103 i103 q i103 e Bb5 i103 i103 q i103 m8 b1 e F5 i103 b1 e A5 i103 b1.5 e D6 i103 b2 e Bb5 i103 b2.5 e D6 i103 b3 q F5 i103 b3 A5 i104 m8 b1 e F5 end tito On Tue, May 29, 2012 at 03:34:47PM +0100, jpff@cs.bath.ac.uk wrote: > Can I have a less cryptic explanation. As far as I can see the change was > to swap two fields in a struct. I cannot see how that changes anything > other than (invisible) layout. > > If you are saying that it is a fenceposts -- count from zero -- I can > blieve it is possible > ==John > > >> Can anyone explain why this changes anything? > > > > implementation of `malloc' > > > > PS the second solution seems better ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net