  #define inclusive_range_check( low, n, high )   \
    do  {                                         \
      __typeof( n ) __tmp_n = ( n );              \
-@@ -79,17 +75,12 @@ static inline void* trace_memcpy_check(void *restrict to, const void *restrict f
+@@ -89,18 +83,13 @@
      lt_check(__tmp_n, high);                    \
    } while (0)
  

+void *memcpy(void *str1, const void *str2, size_t n);
 
 /* NULL check a pointer */
 #define notnull_check( ptr )           do { if ( (ptr) == NULL ) { S2N_ERROR(S2N_ERR_NULL); } } while(0)
 #define notnull_check_ptr( ptr )       do { if ( (ptr) == NULL ) { S2N_ERROR_PTR(S2N_ERR_NULL); } } while(0)
+#define MEMCOPY_COST 2
+
 
 static inline void* trace_memcpy_check(void *restrict to, const void *restrict from, size_t size, const char *debug_str)
 {

-      void *r = trace_memcpy_check( (d), (s) , (__tmp_n), _S2N_DEBUG_LINE); \
-      if (r == NULL) { return -1; }                                         \
-    }                                                                       \
+    memcpy((d), (s), (n));						\
   } while(0)
 
 #define memcpy_check_ptr( d, s, n )                                         \
   do {                                                                      \
-    __typeof( n ) __tmp_n = ( n );                                          \
-    if ( __tmp_n ) {                                                        \
-      void *r = trace_memcpy_check( (d), (s) , (__tmp_n), _S2N_DEBUG_LINE); \
-      if (r == NULL) { return NULL; }                                       \
-    }                                                                       \
+    memcpy((d), (s), (n));						\
   } while(0)
 
 #define memset_check( d, c, n )                                             \
@@ -63,19 +57,19 @@
     if ( __tmp_n ) {                                                        \
       __typeof( d ) __tmp_d = ( d );                                        \
       notnull_check( __tmp_d );                                             \
-      memset( __tmp_d, (c), __tmp_n);                                       \
+      my_memset( __tmp_d, (c), __tmp_n);                                       \
     }                                                                       \
   } while(0)
 
 #define char_to_digit(c, d)  do { if(!isdigit(c)) { S2N_ERROR(S2N_ERR_SAFETY); } d = c - '0'; } while(0)
 
 /* Range check a number */
-#define gte_check(n, min)  do { if ( (n) < min ) { S2N_ERROR(S2N_ERR_SAFETY); } } while(0)
-#define lte_check(n, max)  do { if ( (n) > max ) { S2N_ERROR(S2N_ERR_SAFETY); } } while(0)
