patchlwIP - A Lightweight TCP/IP stack - Patches: patch #5920, Create define to override...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5920: Create define to override C-library memcpy

Submitter:  Simon Goldschmidt <goldsimon>
Submitted:  Tue 08 May 2007 07:13:31 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Thu 10 May 2007 05:20:46 AM UTC, comment #2: 

Checked it in, it's not a binary change, anyway (as long as you don't change the defines).

Closing this as done.

Simon Goldschmidt <goldsimon>
Group administrator
Wed 09 May 2007 09:20:01 AM UTC, comment #1: 

Looks straightforward and fine to me.

Jonathan Larmour <jifl>
Group Member
Tue 08 May 2007 07:13:31 PM UTC, original submission:  

In the attached patch, I have created 2 defines (MEMCPY() and SMEMCPY()) to override the use of C-library memcpy() and instead use a faster function.

SMEMCPY() is used for small sizes as some compilers (mainly gcc?) can inline them. So you wouldn't normally define SMEMCPY but only define MEMCPY to some faster method (e.g. unrolling some loops and using more registers...). This helped me speed up the stack (on an ARM & on NIOS-II) so I think this should also help others.

I replaced all occurences of memcpy() in the stack by what I think is best (SMEMCPY vs. MEMCPY) and will check in this in some days if no objections come.

Simon Goldschmidt <goldsimon>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #12718:  memcpy_define.patch added by goldsimon (14KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jifl (Posted a comment)
  • -email is unavailable- added by goldsimon (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-05-10 goldsimon Open/ClosedOpen Closed
    2007-05-10 goldsimon StatusIn Progress Done
    2007-05-08 goldsimon Attached File- Added memcpy_define.patch, #12718

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code