Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SharedMemoryImpl x64 size error #2976

Closed
trublemaker opened this issue Apr 10, 2020 · 7 comments
Closed

SharedMemoryImpl x64 size error #2976

trublemaker opened this issue Apr 10, 2020 · 7 comments

Comments

@trublemaker
Copy link

i use SharedMemory with x64,
while i set size > 4G , then error,
std::size_t size = 1024LL * 1024 * 1024 * 4;
SharedMemory mem("MySharedMemory", size, SharedMemory::AM_WRITE);

and i find the define of _size is DWORD, while size_t is
#ifdef _WIN64
typedef unsigned __int64 size_t;
....
and _size(static_cast(size)) may lose high

@trublemaker
Copy link
Author

and
_memHandle = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL, _mode, 0, _size, utf16name.c_str());

dwMaximumSizeHigh always set 0, and it should be _size>>32

@github-actions
Copy link

This issue is stale because it has been open for 365 days with no activity.

@github-actions github-actions bot added the stale label Oct 22, 2021
@github-actions
Copy link

This issue was closed because it has been inactive for 60 days since being marked as stale.

@aleks-f aleks-f modified the milestones: Release 1.12.0, Release 1.13.0 Jul 7, 2022
@aleks-f aleks-f reopened this Jul 7, 2022
@aleks-f aleks-f removed the stale label Jul 7, 2022
@Spaky
Copy link
Contributor

Spaky commented Jul 21, 2022

Hey @aleks-f,
i created an improvement that allows SharedMemory greater than 4GB on x64 for win32.
Currently the win32 jobs on GitHub are failing because the paging file is too small,
but on my local machine the new test is successful.

Do you think it is okay, when i create a PR for this issue?

@github-actions
Copy link

This issue is stale because it has been open for 365 days with no activity.

@pavledragisic
Copy link
Member

@aleks-f This commit df656fc ended up here by mistake. It was supposed to go to the issue 2978

@github-actions github-actions bot removed the stale label Nov 24, 2023
@aleks-f
Copy link
Member

aleks-f commented Nov 24, 2023

@aleks-f This commit df656fc ended up here by mistake. It was supposed to go to the issue 2978

@pavledragisic you should --amend it

@aleks-f aleks-f self-assigned this Nov 24, 2023
aleks-f added a commit that referenced this issue Nov 24, 2023
* feat(Foundation): PIDFile and ProcessRunner #4064
* feat(Thread): optional signal blocking on POSIX #2978
* fix(ProcessRunner):remove logger, code enhancement #4225
* feat(Foundation): add PIDFile and ProcessRunner Tests #4064
* fix(Foundation): failing ProcessRunner Test #4064
* fix(PIDFile): remove append argument #4064
* remove Windows TODO from ProcessRunner #4064
* feat(ProcessRunnerTest): add line to checkTimeout #4064
* fix(ProcessRunner): add done flag to run() #4064
* fix(ProcessRunnerTest): add missing pidFile argument #4064
* chore(ProcessRunner): remove comments #4064
* fix(ProcessRunner): add runCount flag #4064
* fix(test): SharedLibrary and Class tests paths
* fix(ProcessRunner): thread sanitizer reported data races #4064
* fix(build): pass env var to testrunner #4064
* chore(PIDFile): remove ; in comments #4064
* feat(ProcessRunner): add Win argument format #4064
* fix(Tests): add ProcessRunnerTest to vcxproj #4064
* fix(Tests): change path to TestApp #4064
* feat(Tests): windows processrunner tests #4064
* fix(Tests): duplicate  ProcessRunnerTest in TestSuite vcxproj  #4064
* fix(CodeQL): sw declaration hides variable  #4064
* fix test binaries path for cmake
* fix(Build): missing include/PIDFile.h buildWin #4064
* fix(Build): add PocoFoundation depend in buildWin #4064
* feat(ProcessRunner): test process launching multiple threads #2976

---------

Co-authored-by: Pavle <pavle@debian-gnu-linux-11.localdomain>
Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
aleks-f added a commit that referenced this issue Nov 25, 2023
@aleks-f aleks-f added the fixed label Nov 25, 2023
aleks-f added a commit that referenced this issue Nov 26, 2023
* fix(sharedMemory): x64 size error #2976

* chore: add Util dependency to Prometheus samples

* fix(HTTPClientSession): not working with UNIX_LOCAL SocketAddress #2578

* fix(WebSocketTest): supress connection reset exception assertion

* fix(PollSet): wait on premature epoll_wait return; reinforce tests for windows

* fix(build): add DataTest dependency to Makefile

* fix(Task): intermittently hanging test and some other improvements

* fix(Net): PollSet loop; suppress test WebSocket handler shutdown IOExeption
aleks-f added a commit that referenced this issue Nov 27, 2023
* feat(Foundation): PIDFile and ProcessRunner #4064
* feat(Thread): optional signal blocking on POSIX #2978
* fix(ProcessRunner):remove logger, code enhancement #4225
* feat(Foundation): add PIDFile and ProcessRunner Tests #4064
* fix(Foundation): failing ProcessRunner Test #4064
* fix(PIDFile): remove append argument #4064
* remove Windows TODO from ProcessRunner #4064
* feat(ProcessRunnerTest): add line to checkTimeout #4064
* fix(ProcessRunner): add done flag to run() #4064
* fix(ProcessRunnerTest): add missing pidFile argument #4064
* chore(ProcessRunner): remove comments #4064
* fix(ProcessRunner): add runCount flag #4064
* fix(test): SharedLibrary and Class tests paths
* fix(ProcessRunner): thread sanitizer reported data races #4064
* fix(build): pass env var to testrunner #4064
* chore(PIDFile): remove ; in comments #4064
* feat(ProcessRunner): add Win argument format #4064
* fix(Tests): add ProcessRunnerTest to vcxproj #4064
* fix(Tests): change path to TestApp #4064
* feat(Tests): windows processrunner tests #4064
* fix(Tests): duplicate  ProcessRunnerTest in TestSuite vcxproj  #4064
* fix(CodeQL): sw declaration hides variable  #4064
* fix test binaries path for cmake
* fix(Build): missing include/PIDFile.h buildWin #4064
* fix(Build): add PocoFoundation depend in buildWin #4064
* feat(ProcessRunner): test process launching multiple threads #2976

---------

Co-authored-by: Pavle <pavle@debian-gnu-linux-11.localdomain>
Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
aleks-f added a commit that referenced this issue Nov 27, 2023
* fix(sharedMemory): x64 size error #2976

* chore: add Util dependency to Prometheus samples

* fix(HTTPClientSession): not working with UNIX_LOCAL SocketAddress #2578

* fix(WebSocketTest): supress connection reset exception assertion

* fix(PollSet): wait on premature epoll_wait return; reinforce tests for windows

* fix(build): add DataTest dependency to Makefile

* fix(Task): intermittently hanging test and some other improvements

* fix(Net): PollSet loop; suppress test WebSocket handler shutdown IOExeption
@aleks-f aleks-f closed this as completed Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants