home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 242,819 of 243,242   
   highcrew to David Brown   
   Re: UB-free slice   
   06 Jan 26 11:25:20   
   
   From: high.crew3868@fastmail.com   
      
   On 1/6/26 9:15 AM, David Brown wrote:   
   > Use memmove.  Your assumption about the performance penalty is   
   > unwarranted - it should be negligible on any scale of things.  And even   
   > if the performance penalty was big, "correct" is better than "fast"   
   > every time.   
      
   Thanks, that's how I corrected the code.   
      
   > You have a very strange definition for your "Buffer" type.  A "Buffer"   
   > type that does not keep track of the start of the buffer, but only the   
   > end point and the space remaining in the memory allocation, is not much   
   > use as a buffer.  It might be useful as a "Buffer_End_Point" type, but   
   > not "Buffer".   
      
   It is used a bit like a cursor.   
   But you are right: it is not properly a buffer, although it can be   
   used to reference a buffer.   
   Perhaps it should be renamed as `struct Slice`.   
      
   --   
   High Crew   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca