summaryrefslogtreecommitdiffstats
path: root/base/shared_memory_win.cc
Commit message (Collapse)AuthorAgeFilesLines
* Move shared_memory into base/memory subdirectory.brettw@chromium.org2013-03-291-253/+0
| | | | | | | | | | This leaves a forwarding header in place so all calling code can be updated asynchronously. BUG= Review URL: https://codereview.chromium.org/13044024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191392 0039d316-1c4b-4281-b951-d872f2087c98
* Make SharedMemory track the size that was actually mappedjschuh@chromium.org2013-03-281-16/+32
| | | | | | | | | | | In the process I also had to fix several dependencies, and some major issues in transport DIBs. BUG=60819 Review URL: https://chromiumcodereview.appspot.com/12537014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191098 0039d316-1c4b-4281-b951-d872f2087c98
* Added SharedMemory::MapFrom.vitalybuka@chromium.org2013-01-161-2/+5
| | | | | | | | | | Fragmentation of address space may prevents process from allocate entire block of shared memory. Particularly in attached bug browser process can't allocate 250Mb to accept data from renderer Mapping smaller blocks is workaround. BUG=93202 Review URL: https://chromiumcodereview.appspot.com/11876037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177109 0039d316-1c4b-4281-b951-d872f2087c98
* The correct type for the size of a chunk of memory is size_t.cevans@chromium.org2013-01-101-2/+8
| | | | | | | | | | | | | | | | | | By using uint32, we have bugs on 64-bit platforms: callers passing in a size_t, will have their size truncated, potentially allocating a smaller chunk than requested. There are a few places this happens, including on the receiving ends of IPCs(!) However, coversely, other callers of the API might directly assign the memory chunk's length to uint32, leading to a different possible truncation problem. This is guaraded against by limiting operations internally to std::numeric_limits<uint32_t> in size for now. There's some minor cascade effects that make the CL look larger than it is. BUG=164678 Review URL: https://codereview.chromium.org/11446048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175987 0039d316-1c4b-4281-b951-d872f2087c98
* Fix integer overflow in Windows shared memory handling.cevans@chromium.org2012-12-061-0/+2
| | | | | | | BUG=164490 Review URL: https://codereview.chromium.org/11450016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171369 0039d316-1c4b-4281-b951-d872f2087c98
* Advertise a minimum alignment for SharedMemory::Map().dalecurtis@chromium.org2012-08-181-0/+2
| | | | | | | | | | | | | | | | | No real changes, just adds a DCHECK() and unit test for a minimum alignment that callers can count on from Map(). Map() is already returning addresses which are aligned to the platform page size. Necessary for a media use case in which a wrapped shared memory object is passed around and is expected to have a certain alignment. BUG=none TEST=unittests, try bots. Review URL: https://chromiumcodereview.appspot.com/10827400 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152218 0039d316-1c4b-4281-b951-d872f2087c98
* Give base::SharedMemory::CreateAnonymous an executable flagmcgrathr@chromium.org2011-12-011-12/+8
| | | | | | | | | | | | | | | | | | | | | NaCl on Mac and Linux needs to create a shared memory object that it can later make executable with mprotect. Express this need in the interface it uses. Add a test that pages mapped from such an object can later be passed to mprotect with PROT_EXEC. This lays the groundwork for a later change that will sometimes use a different method to allocate an object on Linux when it needs to be executable. On some Linux distributions, shm_open yields objects whose mappings cannot be made executable. BUG= http://code.google.com/p/chromium/issues/detail?id=103377 TEST= SharedMemory.AnonymousExecutable R=mark@chromium.org,jam@chromium.org,amit@chromium.org,ben@chromium.org Review URL: http://codereview.chromium.org/8585002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112570 0039d316-1c4b-4281-b951-d872f2087c98
* Replace most LOG/CHECK statements with DLOG/DCHECK statements in base.brettw@chromium.org2011-10-261-1/+1
| | | | | | | | | | | [ Reland of 107042 http://codereview.chromium.org/8368009 ] I tried hard not to change CHECKs that had side effects. I kept fatal checks that seemed security or debugging-info (in crash reports) sensitive, and ones that seems particularly well-conceived. Review URL: http://codereview.chromium.org/8341026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107434 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 107042 - Replace most LOG/CHECK statements with DLOG/DCHECK ↵brettw@chromium.org2011-10-251-1/+1
| | | | | | | | | | | | | | statements in base. I tried hard not to change CHECKs that had side effects. I kept fatal checks that seemed security or debugging-info (in crash reports) sensitive, and ones that seems particularly well-conceived. Review URL: http://codereview.chromium.org/8368009 TBR=brettw@chromium.org Review URL: http://codereview.chromium.org/8351025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107051 0039d316-1c4b-4281-b951-d872f2087c98
* Replace most LOG/CHECK statements with DLOG/DCHECK statements in base.brettw@chromium.org2011-10-251-1/+1
| | | | | | | | | I tried hard not to change CHECKs that had side effects. I kept fatal checks that seemed security or debugging-info (in crash reports) sensitive, and ones that seems particularly well-conceived. Review URL: http://codereview.chromium.org/8368009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107042 0039d316-1c4b-4281-b951-d872f2087c98
* More DCHECK() updates. A mixture of _EQ and _GE.mhm@chromium.org2011-03-011-2/+2
| | | | | | | | Bug=58409 Review URL: http://codereview.chromium.org/6469070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76343 0039d316-1c4b-4281-b951-d872f2087c98
* Chrome Frame: Add explicit object security attributes to the Chrome Frame ↵robertshield@chromium.org2010-11-161-5/+4
| | | | | | | | | | | | | version beacon. This will allow low integrity processes to access shared memory segment and lock and make shared memory segment read only after creation. Also use lock names that include the hosting process. BUG=61609 TEST=Start medium integrity Chrome Frame host running CF version X. Update CF to version Y > X. Start low integrity Chrome Frame host, observe that version X is loaded. Review URL: http://codereview.chromium.org/5012001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66270 0039d316-1c4b-4281-b951-d872f2087c98
* Implementation of single-module-per-logon-session-per-profile implementation ↵robertshield@chromium.org2010-11-051-2/+18
| | | | | | | | | | | | for Chrome Frame. BUG=61383 TEST=Run IE with version X of CF loaded. Register version Y of CF. Run a second IE process, notice that version Y when loaded defers to version X. Review URL: http://codereview.chromium.org/4144008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65236 0039d316-1c4b-4281-b951-d872f2087c98
* Fix up SharedMemory implementation so that it is more equivalent on Windows ↵dmaclach@chromium.org2010-10-271-12/+27
| | | | | | | | | | | | | vs Posix and enforces exclusive creates. Clean up some naming to make it clearer what size you are getting by changing max_size to created_size. BUG=NONE TEST=BUILD Review URL: http://codereview.chromium.org/4034006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64097 0039d316-1c4b-4281-b951-d872f2087c98
* shared_memory: remove wstrings, fix callers.evan@chromium.org2010-09-291-7/+8
| | | | | | | | | BUG=23581 TEST=compiles Review URL: http://codereview.chromium.org/3555002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60985 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Remove unneeded headers from base/ (part 1)thestig@chromium.org2010-08-051-1/+0
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3071012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55034 0039d316-1c4b-4281-b951-d872f2087c98
* Round the size of shared memory regions up to 64K. This allowssehr@google.com2010-03-251-1/+8
| | | | | | | | | native client modules to map these regions. With this fix, Pepper audio works on all three platforms. Review URL: http://codereview.chromium.org/1242006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42621 0039d316-1c4b-4281-b951-d872f2087c98
* Make SharedMemory use uint32 instead of size_t. This removes the remaining ↵jam@chromium.org2010-02-161-2/+2
| | | | | | | | size_t's from the IPC code. Review URL: http://codereview.chromium.org/581001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39164 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a memory leak in ResourceDispatcherhclam@chromium.org2009-05-181-0/+6
| | | | | | | | | | | | When we delete a ResourceLoaderBridge before OnCompletedRequest is received, bad things happen. There's a lot of leaks at the following points: 1. OnMessageReceived ignores the message. 2. RemovePendingRequest removes it's internal deferred_message_queue. But ViewHostMsg_Resource_DataReceived is not POD. We should also close the shared memory handle inside it. Review URL: http://codereview.chromium.org/115396 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16297 0039d316-1c4b-4281-b951-d872f2087c98
* Port visitedlink tests to Linux. Also make them pass on Linux, whichphajdan.jr@chromium.org2009-03-161-0/+5
| | | | | | | | | | | | | may fix the attached bug. The problem was that the debug check was in wrong place (too early, before every member was initialized), so it failed in the test. BUG=8710 Review URL: http://codereview.chromium.org/48005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11734 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Transfer network data using shared memoryagl@chromium.org2009-02-111-0/+9
| | | | | | | | | | | | | | | | | | | | | | This patch adds the long planned support for sharing memory on POSIX by transporting file descriptors. It largely builds on the shared memory cleanup work by jrg. We move FileDescriptor out of chrome/common/file_descriptor_posix.h and into base/file_descriptor_posix.h. Since all that's left in the chrome/common verion is the DescriptorSet, those files are renamed to descriptor_set.[h|cc]. The SharedMemoryHandle on POSIX then becomes a typedef to a FileDescriptor and thus can be serialised over IPC. After that, it's mostly a case of cleaning up those snippets of code which considered SharedMemoryHandles to be scaler values. Review URL: http://codereview.chromium.org/21208 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9580 0039d316-1c4b-4281-b951-d872f2087c98
* Properly honor base::SharedMemory semantics for name="" to meanjrg@chromium.org2009-02-041-0/+5
| | | | | | | | | | | | new/private shared memory on POSIX. Transition base::SharedMemory implementation to file/mmap() to prevent leaking of wired kernel resources and allow easier cleanup. Enable one more shared_memory unit test for POSIX. Enable stats_table_unittest.cc for Mac, and modify it so it cleans up. Review URL: http://codereview.chromium.org/19724 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9114 0039d316-1c4b-4281-b951-d872f2087c98
* Add Terminate() to the Process object, have RenderProcessHost use this to ↵brettw@google.com2008-11-141-0/+3
| | | | | | | | | | avoid some more Windows specific code. Move Process and SharedMemory into the base namespace (most changes). Review URL: http://codereview.chromium.org/10895 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5446 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* The Posix shared memory implementation.avi@google.com2008-08-121-0/+187
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@742 0039d316-1c4b-4281-b951-d872f2087c98