Skip to content

Commit e24723b

Browse files
authored
Merge pull request #890 from skliper/fix875-copyblock_size
Fix #875, Move copyblock size to define
2 parents ead5723 + cdddcee commit e24723b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/os/shared/src/osapi-file.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ enum
6666

6767
OS_stream_internal_record_t OS_stream_table[OS_MAX_NUM_OPEN_FILES];
6868

69+
/*
70+
* OS_cp copyblock size - in theory could be adjusted
71+
* to match page size for performance so providing a unique
72+
* define here. Given a requirement/request could be transitioned
73+
* to a configuration parameter
74+
*/
75+
#define OS_CP_BLOCK_SIZE 512
76+
6977
/*----------------------------------------------------------------
7078
*
7179
* Helper function to close a file from an iterator
@@ -420,7 +428,7 @@ int32 OS_cp(const char *src, const char *dest)
420428
int32 wr_total;
421429
osal_id_t file1;
422430
osal_id_t file2;
423-
uint8 copyblock[512];
431+
uint8 copyblock[OS_CP_BLOCK_SIZE];
424432

425433
/* Check Parameters */
426434
OS_CHECK_POINTER(src);

0 commit comments

Comments
 (0)