From f99eefb288dd2d3d1350dc7b7591127485a99cb0 Mon Sep 17 00:00:00 2001 From: Mark Sturgill Date: Sat, 5 Oct 2013 11:13:09 -0700 Subject: [PATCH] prep constants for rdrand parallelization --- Server/Random.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Server/Random.cs b/Server/Random.cs index 812aad1e4..b3ba5de91 100644 --- a/Server/Random.cs +++ b/Server/Random.cs @@ -91,7 +91,7 @@ namespace Server { private RNGCryptoServiceProvider _CSP = new RNGCryptoServiceProvider(); private static int BUFFER_SIZE = 0x4000; - private static int LARGE_REQUEST = BUFFER_SIZE / 0x100; + private static int LARGE_REQUEST = 0x40; private byte[] _Working = new byte[BUFFER_SIZE]; private byte[] _Buffer = new byte[BUFFER_SIZE]; @@ -168,8 +168,8 @@ namespace Server { [DllImport("rdrand32")] private static extern RDRandError rdrand_get_bytes(int n, byte[] buffer); - private static int BUFFER_SIZE = 0x4000; - private static int LARGE_REQUEST = BUFFER_SIZE / 0x100; + private static int BUFFER_SIZE = 0x10000; + private static int LARGE_REQUEST = 0x40; private byte[] _Working = new byte[BUFFER_SIZE]; private byte[] _Buffer = new byte[BUFFER_SIZE]; @@ -247,8 +247,8 @@ namespace Server { [DllImport("rdrand64")] private static extern RDRandError rdrand_get_bytes(int n, byte[] buffer); - private static int BUFFER_SIZE = 0x4000; - private static int LARGE_REQUEST = BUFFER_SIZE / 0x100; + private static int BUFFER_SIZE = 0x10000; + private static int LARGE_REQUEST = 0x40; private byte[] _Working = new byte[BUFFER_SIZE]; private byte[] _Buffer = new byte[BUFFER_SIZE];