Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: chrome/browser/experiments/memory_ablation_experiment.h

Issue 2896523004: Touch memory ablation payload in chunks. (Closed)
Patch Set: Clarify Unretained(this) Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/experiments/memory_ablation_experiment.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXPERIMENTS_MEMORY_ABLATION_EXPERIMENT_H_ 5 #ifndef CHROME_BROWSER_EXPERIMENTS_MEMORY_ABLATION_EXPERIMENT_H_
6 #define CHROME_BROWSER_EXPERIMENTS_MEMORY_ABLATION_EXPERIMENT_H_ 6 #define CHROME_BROWSER_EXPERIMENTS_MEMORY_ABLATION_EXPERIMENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 17 matching lines...) Expand all
28 28
29 // Starts the experiment if corresponding field trial is enabled 29 // Starts the experiment if corresponding field trial is enabled
30 static void MaybeStart(scoped_refptr<base::SequencedTaskRunner> task_runner); 30 static void MaybeStart(scoped_refptr<base::SequencedTaskRunner> task_runner);
31 31
32 private: 32 private:
33 MemoryAblationExperiment(); 33 MemoryAblationExperiment();
34 34
35 void Start(scoped_refptr<base::SequencedTaskRunner> task_runner, size_t size); 35 void Start(scoped_refptr<base::SequencedTaskRunner> task_runner, size_t size);
36 36
37 void AllocateMemory(size_t size); 37 void AllocateMemory(size_t size);
38 void TouchMemory(); 38 void TouchMemory(size_t offset);
39 void ScheduleTouchMemory(size_t offset);
39 40
40 static MemoryAblationExperiment* GetInstance(); 41 static MemoryAblationExperiment* GetInstance();
41 42
43 scoped_refptr<base::SequencedTaskRunner> task_runner_;
42 size_t memory_size_ = 0; 44 size_t memory_size_ = 0;
43 std::unique_ptr<uint8_t[]> memory_; 45 std::unique_ptr<uint8_t[]> memory_;
44 }; 46 };
45 47
46 #endif // CHROME_BROWSER_EXPERIMENTS_MEMORY_ABLATION_EXPERIMENT_H_ 48 #endif // CHROME_BROWSER_EXPERIMENTS_MEMORY_ABLATION_EXPERIMENT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/experiments/memory_ablation_experiment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698