You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2022/07/12 00:03:03 UTC

[trafficserver] branch master updated: Remove use of sbrk() (#8946)

This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 57ffe7c51 Remove use of sbrk() (#8946)
57ffe7c51 is described below

commit 57ffe7c519bf0f2d50cda974f4e06cc0179fe254
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Tue Jul 12 09:02:57 2022 +0900

    Remove use of sbrk() (#8946)
---
 src/traffic_server/traffic_server.cc | 23 +----------------------
 1 file changed, 1 insertion(+), 22 deletions(-)

diff --git a/src/traffic_server/traffic_server.cc b/src/traffic_server/traffic_server.cc
index d4f25d4af..a9b7009d6 100644
--- a/src/traffic_server/traffic_server.cc
+++ b/src/traffic_server/traffic_server.cc
@@ -260,11 +260,7 @@ struct AutoStopCont : public Continuation {
 class SignalContinuation : public Continuation
 {
 public:
-  SignalContinuation() : Continuation(new_ProxyMutex())
-  {
-    end = snap = nullptr;
-    SET_HANDLER(&SignalContinuation::periodic);
-  }
+  SignalContinuation() : Continuation(new_ProxyMutex()) { SET_HANDLER(&SignalContinuation::periodic); }
 
   int
   periodic(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
@@ -275,19 +271,6 @@ public:
       // TODO: TS-567 Integrate with debugging allocators "dump" features?
       ink_freelists_dump(stderr);
       ResourceTracker::dump(stderr);
-
-      if (!end) {
-        end = static_cast<char *>(sbrk(0));
-      }
-
-      if (!snap) {
-        snap = static_cast<char *>(sbrk(0));
-      }
-
-      char *now = static_cast<char *>(sbrk(0));
-      Note("sbrk 0x%" PRIu64 " from first %" PRIu64 " from last %" PRIu64 "\n", (uint64_t)((ptrdiff_t)now),
-           (uint64_t)((ptrdiff_t)(now - end)), (uint64_t)((ptrdiff_t)(now - snap)));
-      snap = now;
     }
 
     if (signal_received[SIGUSR2]) {
@@ -331,10 +314,6 @@ public:
 
     return EVENT_CONT;
   }
-
-private:
-  const char *end;
-  const char *snap;
 };
 
 class TrackerContinuation : public Continuation