You (DFS) replied ( to me ):
Try it with [int64_t], DFS:
int64_t rows = 1000000000, bytes = (rows+1) * sizeof(int);
int *randarrRelf = (int *)malloc( bytes );
memset( randarrRelf, 0, bytes );
I did try it. [ memset() failed, "long" (occasionally) fails too ]
As a wise man once said, "Linux is for losers".
On 2/16/2024 10:21 AM, Relf wrote:
You (DFS) replied ( to me ):
Try it with [int64_t], DFS:
int64_t rows = 1000000000, bytes = (rows+1) * sizeof(int);
int *randarrRelf = (int *)malloc( bytes );
memset( randarrRelf, 0, bytes );
I did try it. [ memset() failed, "long" (occasionally) fails too ]
As a wise man once said, "Linux is for losers".
;-)
On Fri, 16 Feb 2024 10:23:20 -0500, DFS <nospam@dfs.com> wrote in <H5LzN.80208$SyNd.31052@fx33.iad>:
On 2/16/2024 10:21 AM, Relf wrote:
You (DFS) replied ( to me ):
Try it with [int64_t], DFS:
int64_t rows = 1000000000, bytes = (rows+1) * sizeof(int);
int *randarrRelf = (int *)malloc( bytes );
memset( randarrRelf, 0, bytes );
I did try it. [ memset() failed, "long" (occasionally) fails too ]
As a wise man once said, "Linux is for losers".
;-)
Linux is _not_ for losers like you two.
Here's a free clue: ulimit -a
Try it with [int64_t], DFS:
int64_t rows = 1000000000, bytes = (rows+1) * sizeof(int);
int *randarrRelf = (int *)malloc( bytes );
memset( randarrRelf, 0, bytes );
I did try it. [ memset() failed, "long" (occasionally) fails too ]
On Fri, 16 Feb 2024 10:23:20 -0500, DFS <nospam@dfs.com> wrote in <H5LzN.80208$SyNd.31052@fx33.iad>:
On 2/16/2024 10:21 AM, Relf wrote:
You (DFS) replied ( to me ):
Try it with [int64_t], DFS:
int64_t rows = 1000000000, bytes = (rows+1) * sizeof(int);
int *randarrRelf = (int *)malloc( bytes );
memset( randarrRelf, 0, bytes );
I did try it. [ memset() failed, "long" (occasionally) fails too ]
As a wise man once said, "Linux is for losers".
;-)
Linux is _not_ for losers like you two.
Here's a free clue: ulimit -a
On Friday, February 16, 2024 at 11:08:31 AM UTC-5, vallor wrote:
Linux is _not_ for losers like you two.
Heee, haaaaa, ho, ho, ha, ha, ha, ha, ha, ha, ha!
If I gave any of my code monkeys the task of generating random dates and
then received either of those pathetic C monstrosities, I would only say:
"Monkey don't get no banana. Monkey useless. Monkey will be gassed."
As the wise saying goes: One cannot fix stupid.
Lameass Larry Pietraskiewicz <lordiemassa@gmail.com> wrote:
On Friday, February 16, 2024 at 11:08:31?AM UTC-5, vallor wrote:
Linux is _not_ for losers like you two.
Heee, haaaaa, ho, ho, ha, ha, ha, ha, ha, ha, ha!
If I gave any of my code monkeys the task of generating random dates and
then received either of those pathetic C monstrosities, I would only say:
"Monkey don't get no banana. Monkey useless. Monkey will be gassed."
As the wise saying goes: One cannot fix stupid.
Seriously - lay off the meth.
On 2/16/2024 11:08 AM, vallor wrote:
On Fri, 16 Feb 2024 10:23:20 -0500, DFS <nospam@dfs.com> wrote in
<H5LzN.80208$SyNd.31052@fx33.iad>:
On 2/16/2024 10:21 AM, Relf wrote:
You (DFS) replied ( to me ):
Try it with [int64_t], DFS:
int64_t rows = 1000000000, bytes = (rows+1) * sizeof(int);
int *randarrRelf = (int *)malloc( bytes );
memset( randarrRelf, 0, bytes );
I did try it. [ memset() failed, "long" (occasionally) fails too ]
As a wise man once said, "Linux is for losers".
;-)
Linux is _not_ for losers like you two.
Here's a free clue: ulimit -a
How will that help Relf's code run on Linux?
C library function:
void *memset(void *str, int c, size_t n)
What I'm finding is memset accepts ints where n <= INT_MAX, but above
that requires n to be a size_t variable.
His original wouldn't run on Linux once I specified a sample size of 1B (because 4-byte ints * 1B = 4000000000, which exceeds INT_MAX).
original: bombs
int Bytes = ( rows + 1 ) * sizeof int,
int *randarr = malloc( Bytes );
memset( randarr, 0, Bytes );
fixed: runs
size_t Bytes = ( rows + 1 ) * sizeof int,
int *randarr = malloc( Bytes );
memset( randarr, 0, Bytes );
ObBloaty:
Today is National Almond Day. Some places sell Jordan almonds by the
pound. You know what to do.
size_t Bytes = ( 1000000000 + 1 ) * sizeof int ;
int *randarr = malloc( Bytes );
memset( randarr, 0, Bytes );
DFS:
size_t Bytes = ( 1000000000 + 1 ) * sizeof int ;
int *randarr = malloc( Bytes );
memset( randarr, 0, Bytes );
Does it work on your PC ?
How much faster is it compared to your code ?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 60:32:14 |
Calls: | 6,915 |
Calls today: | 5 |
Files: | 12,379 |
Messages: | 5,431,244 |