Add memory to cryptonight_ctx.
This commit is contained in:
parent
f29d05bdde
commit
8ab4c1c8bd
13 changed files with 85 additions and 81 deletions
|
@ -20,7 +20,7 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __MEMORY_H__
|
||||
#define __MEMORY_H__
|
||||
|
||||
|
@ -58,7 +58,6 @@ static BOOL SetLockPagesPrivilege(HANDLE hProcess, BOOL bEnable) {
|
|||
} Info;
|
||||
|
||||
HANDLE Token;
|
||||
BOOL result;
|
||||
|
||||
if (OpenProcessToken(hProcess, TOKEN_ADJUST_PRIVILEGES, &Token) != TRUE) {
|
||||
return FALSE;
|
||||
|
@ -86,7 +85,7 @@ static BOOL SetLockPagesPrivilege(HANDLE hProcess, BOOL bEnable) {
|
|||
|
||||
|
||||
const char * persistent_memory_allocate() {
|
||||
const int size = TWO_MB_PAGE * (opt_n_threads + 1);
|
||||
const int size = MEMORY * (opt_n_threads + 1);
|
||||
|
||||
if (SetLockPagesPrivilege(GetCurrentProcess(), TRUE)) {
|
||||
persistent_memory_flags |= MEMORY_HUGEPAGES_AVAILABLE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue